Home | History | Annotate | Download | only in test

Lines Matching defs:sock

55 static int closesocket(int sock) {
56 return close(sock);
347 int sock = socket(AF_INET, SOCK_STREAM, 0);
348 if (sock == -1) {
353 if (setsockopt(sock, IPPROTO_TCP, TCP_NODELAY,
356 closesocket(sock);
365 closesocket(sock);
368 if (connect(sock, reinterpret_cast<const sockaddr*>(&sin),
371 closesocket(sock);
374 return sock;
379 explicit SocketCloser(int sock) : sock_(sock) {}
663 int sock = Connect(config->port);
664 if (sock == -1) {
667 SocketCloser closer(sock);
669 ScopedBIO bio(BIO_new_socket(sock, BIO_NOCLOSE));