# /home/src/PHP-JAVA-BRIDGE/PHP5/php-java-bridge/protocol.c File Reference

`#include <stdarg.h>`
`#include <errno.h>`
`#include <string.h>`
`#include <stdlib.h>`
`#include "protocol.h"`
`#include "php_java.h"`
`#include "java_bridge.h"`
`#include "php_java_snprintf.h"`

## Defines

#define | SLEN 256
#define | SEND_SIZE 8192
#define | ILEN 40
#define | PRECISION "14"
#define | FLEN 160
#define | GROW(size)
#define | GROW_QUOTE()

## Functions

void | protocol_end (proxyenv *env)
void | check_context (proxyenv *env TSRMLS_DC)
void | setResultWith_context (char *key, char *val, char *path)
proxyenv * | createSecureEnvironment (int peer, void(*handle_request)(proxyenv *env), char *server_name, short is_local, struct sockaddr *saddr)

## Define Documentation

#define FLEN 160

#define GROW | ( | size |  | ) |

Value:

    { \
      flen = size; \
      if((*env)->send_len+size>=(*env)->send_size) { \
        size_t nsize = (*env)->send_len+size+SEND_SIZE; \
            (*env)->send=realloc((*env)->send, (*env)->send_size=nsize); \
            assert((*env)->send); if(!(*env)->send) exit(9); \
      } \
    }

#define GROW_QUOTE | (

)

Value:

    if(pos+8>=newlen) { \
        newlen=newlen+newlen/10; \
        new=realloc(new, newlen+8); \
        assert(new); if(!new) exit(9); \
      }

#define ILEN 40

#define PRECISION "14"

#define SEND_SIZE 8192

#define SLEN 256

## Function Documentation

void check_context | ( | proxyenv *env | TSRMLS_DC | ) |

proxyenv* createSecureEnvironment | ( | int | peer,
|  | void(*)(proxyenv *env) | handle_request,
|  | char * | server_name,
|  | short | is_local,
|  | struct sockaddr * | saddr
| ) |

void protocol_end | ( | proxyenv * | env | ) |

void setResultWith_context | ( | char * | key,
|  | char * | val,
|  | char * | path
| ) |