FACT++  1.0
int tcpip_start_read ( int  conn_id,
char *  buffer,
int  size,
void(*)()  ast_routine 
)

Definition at line 949 of file tcpip.c.

References buffer, NET_CONNECTION::buffer, enable_sig(), Net_conns, NET_CONNECTION::read_rout, NET_CONNECTION::reading, size, NET_CONNECTION::size, and TRUE.

Referenced by ast_read_h(), dna_start_read(), and web_start_read().

950 {
951  /* Install signal handler stuff on the socket, and record
952  * some necessary information: we are reading, and want size
953  * as size, and use buffer.
954  */
955 
956  Net_conns[conn_id].read_rout = ast_routine;
957  Net_conns[conn_id].buffer = buffer;
958  Net_conns[conn_id].size = size;
959  if(Net_conns[conn_id].reading == -1)
960  {
961  if(enable_sig( conn_id ) == -1)
962  {
963 #ifdef DEBUG
964  printf("START_READ - enable_sig returned -1\n");
965 #endif
966  return(0);
967  }
968  }
969  Net_conns[conn_id].reading = TRUE;
970  return(1);
971 }
void(* read_rout)()
Definition: dim.h:400
char * buffer
Definition: dim.h:401
DllExp DIM_NOSHARE NET_CONNECTION * Net_conns
Definition: conn_handler.c:32
#define TRUE
Definition: dim.h:135
int size
Definition: dim.h:402
int buffer[BUFFSIZE]
Definition: db_dim_client.c:14
int size
Definition: db_dim_server.c:17
static int enable_sig(int conn_id)
Definition: tcpip.c:355
int reading
Definition: dim.h:410

+ Here is the call graph for this function:

+ Here is the caller graph for this function: