Lines Matching refs:sockfd

101 static void set_ipv6_v6only(curl_socket_t sockfd, int on)  in set_ipv6_v6only()  argument
103 (void)setsockopt(sockfd, IPPROTO_IPV6, IPV6_V6ONLY, (void *)&on, sizeof(on)); in set_ipv6_v6only()
109 static void tcpnodelay(struct Curl_easy *data, curl_socket_t sockfd) in tcpnodelay() argument
116 if(setsockopt(sockfd, level, TCP_NODELAY, (void *)&onoff, in tcpnodelay()
122 (void)sockfd; in tcpnodelay()
132 curl_socket_t sockfd) in nosigpipe() argument
136 if(setsockopt(sockfd, SOL_SOCKET, SO_NOSIGPIPE, (void *)&onoff, in nosigpipe()
178 curl_socket_t sockfd) in tcpkeepalive() argument
183 if(setsockopt(sockfd, SOL_SOCKET, SO_KEEPALIVE, in tcpkeepalive()
187 sockfd, SOCKERRNO); in tcpkeepalive()
195 if(setsockopt(sockfd, IPPROTO_TCP, TCP_KEEPIDLE, in tcpkeepalive()
199 sockfd, SOCKERRNO); in tcpkeepalive()
203 if(setsockopt(sockfd, IPPROTO_TCP, TCP_KEEPINTVL, in tcpkeepalive()
207 sockfd, SOCKERRNO); in tcpkeepalive()
210 if(setsockopt(sockfd, IPPROTO_TCP, TCP_KEEPCNT, in tcpkeepalive()
214 sockfd, SOCKERRNO); in tcpkeepalive()
226 if(WSAIoctl(sockfd, SIO_KEEPALIVE_VALS, (LPVOID) &vals, sizeof(vals), in tcpkeepalive()
229 "%" FMT_SOCKET_T ": errno %d", sockfd, SOCKERRNO); in tcpkeepalive()
236 if(setsockopt(sockfd, IPPROTO_TCP, TCP_KEEPIDLE, in tcpkeepalive()
240 sockfd, SOCKERRNO); in tcpkeepalive()
246 if(setsockopt(sockfd, IPPROTO_TCP, TCP_KEEPALIVE, in tcpkeepalive()
250 sockfd, SOCKERRNO); in tcpkeepalive()
256 if(setsockopt(sockfd, IPPROTO_TCP, TCP_KEEPALIVE_THRESHOLD, in tcpkeepalive()
260 sockfd, SOCKERRNO); in tcpkeepalive()
266 if(setsockopt(sockfd, IPPROTO_TCP, TCP_KEEPINTVL, in tcpkeepalive()
270 sockfd, SOCKERRNO); in tcpkeepalive()
287 if(setsockopt(sockfd, IPPROTO_TCP, TCP_KEEPALIVE_ABORT_THRESHOLD, in tcpkeepalive()
290 "%" FMT_SOCKET_T ": errno %d", sockfd, SOCKERRNO); in tcpkeepalive()
295 if(setsockopt(sockfd, IPPROTO_TCP, TCP_KEEPCNT, in tcpkeepalive()
298 "%" FMT_SOCKET_T ": errno %d", sockfd, SOCKERRNO); in tcpkeepalive()
344 curl_socket_t *sockfd) in socket_open() argument
359 *sockfd = data->set.fopensocket(data->set.opensocket_client, in socket_open()
366 *sockfd = socket(addr->family, addr->socktype, addr->protocol); in socket_open()
369 if(*sockfd == CURL_SOCKET_BAD) in socket_open()
395 curl_socket_t *sockfd) in Curl_socket_open() argument
404 return socket_open(data, addr, sockfd); in Curl_socket_open()
459 void Curl_sndbuf_init(curl_socket_t sockfd) in Curl_sndbuf_init() argument
478 if(getsockopt(sockfd, SOL_SOCKET, SO_SNDBUF, (char *)&curval, &curlen) == 0) in Curl_sndbuf_init()
482 setsockopt(sockfd, SOL_SOCKET, SO_SNDBUF, (const char *)&val, sizeof(val)); in Curl_sndbuf_init()
569 curl_socket_t sockfd, int af, unsigned int scope) in bindlocal() argument
625 if(setsockopt(sockfd, SOL_SOCKET, SO_BINDTODEVICE, in bindlocal()
786 (void)setsockopt(sockfd, SOL_IP, IP_BIND_ADDRESS_NO_PORT, &on, sizeof(on)); in bindlocal()
789 if(bind(sockfd, sock, sizeof_sa) >= 0) { in bindlocal()
826 static bool verifyconnect(curl_socket_t sockfd, int *error) in verifyconnect() argument
858 if(0 != getsockopt(sockfd, SOL_SOCKET, SO_ERROR, (void *)&err, &errSize)) in verifyconnect()
883 (void)sockfd; in verifyconnect()