Lines Matching refs:sock
65 static int closesocket(int sock) {
66 return close(sock);
652 int sock = socket(AF_INET, SOCK_STREAM, 0);
653 if (sock == -1) {
658 if (setsockopt(sock, IPPROTO_TCP, TCP_NODELAY,
661 closesocket(sock);
670 closesocket(sock);
673 if (connect(sock, reinterpret_cast<const sockaddr*>(&sin),
676 closesocket(sock);
679 return sock;
684 explicit SocketCloser(int sock) : sock_(sock) {}
1264 int sock = Connect(config->port);
1265 if (sock == -1) {
1268 SocketCloser closer(sock);
1270 ScopedBIO bio(BIO_new_socket(sock, BIO_NOCLOSE));