FACT++  1.0
int tcpip_close ( int  conn_id)

Definition at line 1510 of file tcpip.c.

References NET_CONNECTION::channel, closesock, dtq_rem_entry(), Net_conns, NET_CONNECTION::node, NET_CONNECTION::port, queue_id, NET_CONNECTION::task, NET_CONNECTION::timr_ent, and NET_CONNECTION::write_timedout.

Referenced by dna_open_client(), and release_conn().

1511 {
1512  int channel;
1513  /* Clear all traces of the connection conn_id.
1514  */
1515  if(Net_conns[conn_id].timr_ent)
1516  {
1517  dtq_rem_entry(queue_id, Net_conns[conn_id].timr_ent);
1518  Net_conns[conn_id].timr_ent = NULL;
1519  }
1520  channel = Net_conns[conn_id].channel;
1521  Net_conns[conn_id].channel = 0;
1522  Net_conns[conn_id].port = 0;
1523  Net_conns[conn_id].node[0] = 0;
1524  Net_conns[conn_id].task[0] = 0;
1525  if(channel)
1526  {
1527  if(Net_conns[conn_id].write_timedout)
1528  {
1529  Net_conns[conn_id].write_timedout = 0;
1530 #if defined(__linux__) && !defined (darwin)
1531  shutdown(channel, 2);
1532 #endif
1533  }
1534  closesock(channel);
1535  }
1536  return(1);
1537 }
TIMR_ENT * timr_ent
Definition: dim.h:413
char task[MAX_TASK_NAME]
Definition: dim.h:408
DllExp DIM_NOSHARE NET_CONNECTION * Net_conns
Definition: conn_handler.c:32
char node[MAX_NODE_NAME]
Definition: dim.h:407
int channel
Definition: dim.h:398
int port
Definition: dim.h:409
int dtq_rem_entry(int queue_id, TIMR_ENT *entry)
Definition: dtq.c:503
#define closesock(s)
Definition: tcpip.c:36
static int queue_id
Definition: tcpip.c:93
int write_timedout
Definition: dim.h:412

+ Here is the call graph for this function:

+ Here is the caller graph for this function: