• Home
  • Raw
  • Download

Lines Matching refs:sock

194     int sock, nn;  in inet_connect_opts()  local
229 sock = socket_create(sock_address_get_family(e), SOCKET_STREAM); in inet_connect_opts()
230 if (sock < 0) { in inet_connect_opts()
235 socket_set_xreuseaddr(sock); in inet_connect_opts()
238 if (socket_connect(sock,e) < 0) { in inet_connect_opts()
243 socket_close(sock); in inet_connect_opts()
253 sock = -1; in inet_connect_opts()
256 return sock; in inet_connect_opts()
269 int sock = -1; in inet_dgram_opts() local
327 sock = socket_create(sock_address_get_family(e), SOCKET_DGRAM); in inet_dgram_opts()
328 if (sock < 0) { in inet_dgram_opts()
333 socket_set_xreuseaddr(sock); in inet_dgram_opts()
336 if (socket_bind(sock, local) < 0) { in inet_dgram_opts()
339 socket_close(sock); in inet_dgram_opts()
344 if (socket_connect(sock,e) < 0) { in inet_dgram_opts()
349 socket_close(sock); in inet_dgram_opts()
359 sock = -1; in inet_dgram_opts()
365 return sock; in inet_dgram_opts()
448 int sock = -1; in inet_listen() local
452 sock = inet_listen_opts(opts, port_offset); in inet_listen()
453 if (sock != -1 && ostr) { in inet_listen()
469 return sock; in inet_listen()
475 int sock = -1; in inet_connect() local
479 sock = inet_connect_opts(opts); in inet_connect()
481 return sock; in inet_connect()
491 int sock, fd; in unix_listen_opts() local
511 sock = socket_unix_server(upath, SOCKET_STREAM); in unix_listen_opts()
513 if (sock < 0) { in unix_listen_opts()
521 return sock; in unix_listen_opts()
524 socket_close(sock); in unix_listen_opts()
532 int ret, sock; in unix_connect_opts() local
534 sock = socket_create_unix(SOCKET_STREAM); in unix_connect_opts()
535 if (sock < 0) { in unix_connect_opts()
541 ret = socket_connect(sock, &un); in unix_connect_opts()
551 return sock; in unix_connect_opts()
559 int sock, len; in unix_listen() local
576 sock = unix_listen_opts(opts); in unix_listen()
578 if (sock != -1 && ostr) in unix_listen()
581 return sock; in unix_listen()
587 int sock; in unix_connect() local
591 sock = unix_connect_opts(opts); in unix_connect()
593 return sock; in unix_connect()