Home
last modified time | relevance | path

Searched refs:sock (Results 1 – 25 of 56) sorted by relevance

123

/curl/tests/libtest/
H A Dlib677.c38 curl_socket_t sock = CURL_SOCKET_BAD; in test() local
65 curl_easy_getinfo(curl, CURLINFO_ACTIVESOCKET, &sock); in test()
66 if(sock == CURL_SOCKET_BAD) in test()
72 if(sock != CURL_SOCKET_BAD) { in test()
75 curl_easy_getinfo(curl, CURLINFO_ACTIVESOCKET, &sock); in test()
76 waitfd.fd = sock; in test()
78 curl_multi_wait(mcurl, &waitfd, sock == CURL_SOCKET_BAD ? 0 : 1, 50, in test()
80 if((sock != CURL_SOCKET_BAD) && (waitfd.revents & waitfd.events)) { in test()
121 sock = CURL_SOCKET_BAD; in test()
H A Dlibntlmconnect.c44 curl_socket_t sock; in callback() local
64 sock = CURL_SOCKET_BAD; in callback()
66 sock = (curl_socket_t)longdata; in callback()
68 if(sock != CURL_SOCKET_BAD) { in callback()
72 ntlm_sockets[idx] = sock; in callback()
74 else if(sock != ntlm_sockets[idx]) { in callback()
78 curlx_sztosi(idx), (int)ntlm_sockets[idx], (int)sock); in callback()
H A Dlib500.c43 static int tst_closesocket(void *clientp, curl_socket_t sock) in tst_closesocket() argument
47 return sclose(sock); in tst_closesocket()
/curl/lib/
H A Dcf-socket.c426 sclose(sock); in socket_close()
1006 if(ctx->sock == cf->conn->sock[cf->sockindex]) in cf_socket_close()
1281 ctx->sock); in do_connect()
1487 cf->conn->sock[cf->sockindex] = ctx->sock; in cf_socket_send()
1643 cf->conn->sock[cf->sockindex] = ctx->sock; in cf_socket_active()
1695 pfd[0].fd = ctx->sock; in cf_socket_conn_is_alive()
2156 ctx->sock = s_accepted; in cf_tcp_accept_connect()
2158 cf->conn->sock[cf->sockindex] = ctx->sock; in cf_tcp_accept_connect()
2220 ctx->sock = *s; in Curl_conn_tcp_listen_set()
2229 conn->sock[sockindex] = ctx->sock; in Curl_conn_tcp_listen_set()
[all …]
H A Dcfilters.h598 struct easy_pollset *ps, curl_socket_t sock,
601 #define Curl_pollset_add_in(data, ps, sock) \ argument
602 Curl_pollset_change((data), (ps), (sock), CURL_POLL_IN, 0)
603 #define Curl_pollset_add_out(data, ps, sock) \ argument
605 #define Curl_pollset_add_inout(data, ps, sock) \ argument
606 Curl_pollset_change((data), (ps), (sock), \
608 #define Curl_pollset_set_in_only(data, ps, sock) \ argument
609 Curl_pollset_change((data), (ps), (sock), \
611 #define Curl_pollset_set_out_only(data, ps, sock) \ argument
612 Curl_pollset_change((data), (ps), (sock), \
[all …]
H A Dselect.c441 curl_socket_t sock, short events, bool fold) in cpfds_add_sock() argument
447 if(sock == cpfds->pfds[i].fd) { in cpfds_add_sock()
458 cpfds->pfds[cpfds->n].fd = sock; in cpfds_add_sock()
465 curl_socket_t sock, short events) in Curl_pollfds_add_sock() argument
467 return cpfds_add_sock(cpfds, sock, events, FALSE); in Curl_pollfds_add_sock()
503 curl_socket_t sock, short events) in cwfds_add_sock() argument
509 if(sock == cwfds->wfds[i].fd) { in cwfds_add_sock()
518 cwfds->wfds[cwfds->n].fd = sock; in cwfds_add_sock()
H A Dcfilters.c657 curl_socket_t sock; in Curl_conn_cf_get_socket() local
659 return sock; in Curl_conn_cf_get_socket()
692 fake_sclose(data->conn->sock[sockindex]); in Curl_conn_forget_socket()
693 data->conn->sock[sockindex] = CURL_SOCKET_BAD; in Curl_conn_forget_socket()
917 DEBUGASSERT(VALID_SOCK(sock)); in Curl_pollset_change()
918 if(!VALID_SOCK(sock)) in Curl_pollset_change()
925 if(ps->sockets[i] == sock) { in Curl_pollset_change()
953 ps->sockets[i] = sock; in Curl_pollset_change()
964 Curl_pollset_change(data, ps, sock, in Curl_pollset_set()
1012 DEBUGASSERT(VALID_SOCK(sock)); in Curl_pollset_check()
[all …]
H A Dpingpong.c88 curl_socket_t sock = conn->sock[FIRSTSOCKET]; in Curl_pp_statemach() local
116 rc = Curl_socket_check(pp->sendleft ? CURL_SOCKET_BAD : sock, /* reading */ in Curl_pp_statemach()
118 pp->sendleft ? sock : CURL_SOCKET_BAD, /* writing */ in Curl_pp_statemach()
392 socks[0] = conn->sock[FIRSTSOCKET]; in Curl_pp_getsock()
H A Dtransfer.c170 sockindex = (data->conn->sockfd == data->conn->sock[SECONDARYSOCKET]); in xfer_recv_shutdown()
182 sockindex = (data->conn->sockfd == data->conn->sock[SECONDARYSOCKET]); in xfer_recv_shutdown_started()
194 sockindex = (data->conn->writesockfd == data->conn->sock[SECONDARYSOCKET]); in Curl_xfer_send_shutdown()
799 ((writesockindex == -1 ? CURL_SOCKET_BAD : conn->sock[writesockindex])) : in xfer_setup()
800 conn->sock[sockindex]; in xfer_setup()
808 CURL_SOCKET_BAD : conn->sock[sockindex]; in xfer_setup()
810 CURL_SOCKET_BAD : conn->sock[writesockindex]; in xfer_setup()
922 (data->conn->writesockfd == data->conn->sock[SECONDARYSOCKET])); in Curl_xfer_needs_flush()
930 (data->conn->writesockfd == data->conn->sock[SECONDARYSOCKET])); in Curl_xfer_flush()
945 (data->conn->writesockfd == data->conn->sock[SECONDARYSOCKET])); in Curl_xfer_send()
[all …]
H A Dasyn.h119 int Curl_resolver_getsock(struct Curl_easy *data, curl_socket_t *sock);
H A Dcf-socket.h77 curl_socket_t sock);
H A Dsocks_gssapi.c110 curl_socket_t sock = conn->sock[cf->sockindex]; in Curl_SOCKS5_gssapi_negotiate() local
173 (void)curlx_nonblock(sock, FALSE); in Curl_SOCKS5_gssapi_negotiate()
526 (void)curlx_nonblock(sock, TRUE); in Curl_SOCKS5_gssapi_negotiate()
H A Dselect.h131 curl_socket_t sock, short events);
/curl/tests/server/
H A Dsocksd.c306 return sock; in socksconnect()
834 sclose(sock); in sockdaemon()
839 sclose(sock); in sockdaemon()
890 sclose(sock); in sockdaemon()
914 sclose(sock); in sockdaemon()
935 sclose(sock); in sockdaemon()
941 rc = listen(sock, 5); in sockdaemon()
946 sclose(sock); in sockdaemon()
950 return sock; in sockdaemon()
1099 sock = sockdaemon(sock, &port in main()
[all …]
H A Dmqttd.c818 sclose(sock); in sockdaemon()
823 sclose(sock); in sockdaemon()
863 sclose(sock); in sockdaemon()
885 sclose(sock); in sockdaemon()
906 sclose(sock); in sockdaemon()
912 rc = listen(sock, 5); in sockdaemon()
917 sclose(sock); in sockdaemon()
921 return sock; in sockdaemon()
1049 sock = sockdaemon(sock, &port); in main()
1078 if(sock != CURL_SOCKET_BAD) in main()
[all …]
H A Dsockfilt.c1240 sclose(sock); in sockdaemon()
1245 sclose(sock); in sockdaemon()
1285 sclose(sock); in sockdaemon()
1307 sclose(sock); in sockdaemon()
1328 sclose(sock); in sockdaemon()
1336 return sock; in sockdaemon()
1340 rc = listen(sock, 5); in sockdaemon()
1345 sclose(sock); in sockdaemon()
1349 return sock; in sockdaemon()
1536 sock = sockdaemon(sock, &port); in main()
[all …]
H A Drtspd.c941 written = swrite(sock, buffer, num); in send_doc()
1054 curl_socket_t sock = CURL_SOCKET_BAD; in main() local
1160 sock = socket(AF_INET, SOCK_STREAM, 0); in main()
1163 sock = socket(AF_INET6, SOCK_STREAM, 0); in main()
1166 if(CURL_SOCKET_BAD == sock) { in main()
1224 sclose(sock); in main()
1245 sclose(sock); in main()
1252 rc = listen(sock, 5); in main()
1276 msgsock = accept(sock, NULL, NULL); in main()
1377 if(sock != CURL_SOCKET_BAD) in main()
[all …]
H A Dsws.c884 send_doc(sock, req); in get_request()
911 FD_SET(sock, &input); in get_request()
1851 msgsock = accept(sock, NULL, NULL); in accept_connection()
1997 curl_socket_t sock = CURL_SOCKET_BAD; in main() local
2181 all_sockets[0] = sock; in main()
2184 if(CURL_SOCKET_BAD == sock) { in main()
2258 sclose(sock); in main()
2279 sclose(sock); in main()
2292 rc = listen(sock, 50); in main()
2466 if(sock != CURL_SOCKET_BAD) in main()
[all …]
H A Dtftpd.c558 curl_socket_t sock = CURL_SOCKET_BAD; in main() local
656 sock = socket(AF_INET, SOCK_DGRAM, 0); in main()
659 sock = socket(AF_INET6, SOCK_DGRAM, 0); in main()
662 if(CURL_SOCKET_BAD == sock) { in main()
670 if(0 != setsockopt(sock, SOL_SOCKET, SO_REUSEADDR, in main()
686 rc = bind(sock, &me.sa, sizeof(me.sa4)); in main()
694 rc = bind(sock, &me.sa, sizeof(me.sa6)); in main()
723 sclose(sock); in main()
851 if((peer != sock) && (peer != CURL_SOCKET_BAD)) in main()
854 if(sock != CURL_SOCKET_BAD) in main()
[all …]
H A Dutil.h94 int bind_unix_socket(curl_socket_t sock, const char *unix_socket,
/curl/lib/vquic/
H A Dcurl_msh3.c141 ctx->sock[SP_LOCAL] = CURL_SOCKET_BAD; in cf_msh3_ctx_init()
142 ctx->sock[SP_REMOTE] = CURL_SOCKET_BAD; in cf_msh3_ctx_init()
892 if(ctx->sock[SP_LOCAL] == CURL_SOCKET_BAD) { in cf_msh3_connect()
894 ctx->sock[SP_LOCAL] = CURL_SOCKET_BAD; in cf_msh3_connect()
895 ctx->sock[SP_REMOTE] = CURL_SOCKET_BAD; in cf_msh3_connect()
956 if(ctx->sock[SP_LOCAL] == cf->conn->sock[cf->sockindex]) { in cf_msh3_close()
958 (int)ctx->sock[SP_LOCAL]); in cf_msh3_close()
970 sclose(ctx->sock[SP_LOCAL]); in cf_msh3_close()
973 sclose(ctx->sock[SP_REMOTE]); in cf_msh3_close()
975 ctx->sock[SP_LOCAL] = CURL_SOCKET_BAD; in cf_msh3_close()
[all …]
/curl/lib/vssh/
H A Dwolfssh.c71 curl_socket_t *sock);
370 curl_socket_t sock = conn->sock[FIRSTSOCKET]; in wssh_connect() local
412 rc = wolfSSH_set_fd(sshc->ssh_session, (int)sock); in wssh_connect()
1021 curl_socket_t sock = conn->sock[FIRSTSOCKET]; in wssh_block_statemach() local
1025 fd_read = sock; in wssh_block_statemach()
1027 fd_write = sock; in wssh_block_statemach()
1136 curl_socket_t *sock) in wssh_getsock() argument
1141 sock[0] = conn->sock[FIRSTSOCKET]; in wssh_getsock()
/curl/docs/libcurl/opts/
H A DCURLOPT_UNIX_SOCKET_PATH.md65 curl_easy_setopt(curl, CURLOPT_UNIX_SOCKET_PATH, "/tmp/httpd.sock");
79 snprintf(path, sizeof(path), "/proc/self/fd/%d/httpd.sock", dirfd);
/curl/docs/cmdline-opts/
H A Dsocks4a.md24 `socks4a://localhost/path/to/socket.sock`
H A Dsocks5-hostname.md23 `socks5h://localhost/path/to/socket.sock`

Completed in 74 milliseconds

123