1187 struct sockaddr_in sockname;
1188 int path, val, ret_code, ret;
1191 if( (path = (
int)socket(AF_INET, SOCK_STREAM, 0)) == -1 )
1197 if ((ret_code = setsockopt(path, IPPROTO_TCP, TCP_NODELAY,
1198 (
char*)&val,
sizeof(val))) == -1 )
1202 printf(
"Couln't set TCP_NODELAY\n");
1209 if ((ret_code = setsockopt(path, SOL_SOCKET, SO_SNDBUF,
1210 (
void *)&val,
sizeof(val))) == -1 )
1213 printf(
"Couln't set SO_SNDBUF\n");
1232 if ((ret_code = setsockopt(path, SOL_SOCKET, SO_RCVBUF,
1233 (
void *)&val,
sizeof(val))) == -1 )
1236 printf(
"Couln't set SO_RCVBUF\n");
1248 sockname.sin_family = AF_INET;
1249 sockname.sin_addr.s_addr = INADDR_ANY;
1250 sockname.sin_port = htons((
ushort) *port);
1252 errno = EADDRNOTAVAIL;
1255 WSASetLastError(errno);
1259 ret = bind(path, (
struct sockaddr*)&sockname,
sizeof(sockname));
1263 }
while( ret == -1 );
1270 if( setsockopt(path, SOL_SOCKET, SO_REUSEADDR, (
char*)&val,
1271 sizeof(val)) == -1 )
1274 printf(
"Couln't set SO_REUSEADDR\n");
1280 sockname.sin_family = AF_INET;
1281 sockname.sin_addr.s_addr = INADDR_ANY;
1282 sockname.sin_port = htons((
ushort) *port);
1283 if( (ret = bind(path, (
struct sockaddr*) &sockname,
sizeof(sockname))) == -1 )
1297 strcpy(
Net_conns[conn_id].task, task );
DllExp DIM_NOSHARE NET_CONNECTION * Net_conns
int dim_tcpip_init(int thr_flag)
Warning because the service this data corrsponds to might have been last updated longer ago than Local time
static int Write_buffer_size
static int Read_buffer_size
static int Listen_backlog