Definition at line 355 of file tcpip.c.
References closesock, Curr_N_Conns, DIM_IO_Done, DIM_IO_path, DIM_IO_valid, dim_tcpip_init(), Memory::free(), i, init_done, Memory::malloc(), Net_conns, Threads_on, and Write_buffer_size.
Referenced by tcpip_start_listen(), and tcpip_start_read().
357 int ret = 1, flags = 1;
365 printf(
"Enabling signals on channel 0\n");
383 if( (
DIM_IO_path[0] = (
int)socket(AF_INET, SOCK_STREAM, 0)) == -1 )
391 perror(
"ioctlsocket");
411 ret = ioctl(
Net_conns[conn_id].channel, SIOCSPGRP, &pid );
413 ret = fcntl(
Net_conns[conn_id].channel,F_SETOWN, pid);
418 printf(
"ioctl returned -1\n");
423 ret = ioctl(
Net_conns[conn_id].channel, FIOASYNC, &flags );
427 printf(
"ioctl1 returned -1\n");
432 flags = fcntl(
Net_conns[conn_id].channel,F_GETFD,0);
439 ret = fcntl(
Net_conns[conn_id].channel,F_SETFD, flags | FD_CLOEXEC );
443 printf(
"ioctl2 returned -1\n");
DllExp DIM_NOSHARE NET_CONNECTION * Net_conns
static int DIM_IO_path[2]
int dim_tcpip_init(int thr_flag)