Lines Matching refs:sock
105 static int init_client_ip(int *sock,unsigned char ip[4], int port, int type);
106 static int init_server(int *sock, int port, int type);
107 static int init_server_long(int *sock, int port,char *ip, int type);
108 static int do_accept(int acc_sock, int *sock, char **host);
237 int init_client(int *sock, char *host, int port, int type)
245 return(init_client_ip(sock,ip,port,type));
248 static int init_client_ip(int *sock, unsigned char ip[4], int port, int type)
284 *sock=s;
290 int sock;
306 if (do_accept(accept_socket,&sock,&name) == 0)
313 sock = accept_socket;
314 i=(*cb)(name,sock, context);
317 SHUTDOWN2(sock);
326 static int init_server_long(int *sock, int port, char *ip, int type)
370 *sock=s;
380 static int init_server(int *sock, int port, int type)
382 return(init_server_long(sock, port, NULL, type));
385 static int do_accept(int acc_sock, int *sock, char **host)
472 *sock=ret;