Lines Matching defs:sock
109 static int init_client_ip(int *sock, unsigned char ip[4], int port, int type);
110 static int init_server(int *sock, int port, int type);
111 static int init_server_long(int *sock, int port, char *ip, int type);
112 static int do_accept(int acc_sock, int *sock, char **host);
234 int init_client(int *sock, char *host, int port, int type)
241 return init_client_ip(sock, ip, port, type);
244 static int init_client_ip(int *sock, unsigned char ip[4], int port, int type)
288 *sock = s;
297 int sock;
311 if (do_accept(accept_socket, &sock, &name) == 0) {
316 sock = accept_socket;
317 i = (*cb) (name, sock, type, context);
321 SHUTDOWN2(sock);
331 static int init_server_long(int *sock, int port, char *ip, int type)
375 *sock = s;
384 static int init_server(int *sock, int port, int type)
386 return (init_server_long(sock, port, NULL, type));
389 static int do_accept(int acc_sock, int *sock, char **host)
476 *sock = ret;