Lines Matching refs:sock
27 PHPAPI int socketpair_win32(int domain, int type, int protocol, SOCKET sock[2], int overlapped) in socketpair_win32()
38 sock[1] = redirect = INVALID_SOCKET; in socketpair_win32()
40 sock[0] = socket(domain, type, protocol); in socketpair_win32()
41 if (INVALID_SOCKET == sock[0]) { in socketpair_win32()
49 if (bind(sock[0], (struct sockaddr *) &address, sizeof(address)) != 0) { in socketpair_win32()
53 if (getsockname(sock[0], (struct sockaddr *) &address, &size) != 0) { in socketpair_win32()
57 if (listen(sock[0], 2) != 0) { in socketpair_win32()
62 sock[1] = socket(domain, type, protocol); in socketpair_win32()
64 sock[1] = WSASocket(domain, type, protocol, NULL, 0, 0); in socketpair_win32()
67 if (INVALID_SOCKET == sock[1]) { in socketpair_win32()
72 if (connect(sock[1], (struct sockaddr *) &address, sizeof(address)) != 0) { in socketpair_win32()
76 redirect = accept(sock[0], (struct sockaddr *) &address, &size); in socketpair_win32()
81 closesocket(sock[0]); in socketpair_win32()
82 sock[0] = redirect; in socketpair_win32()
88 closesocket(sock[0]); in socketpair_win32()
89 closesocket(sock[1]); in socketpair_win32()
94 PHPAPI int socketpair(int domain, int type, int protocol, SOCKET sock[2]) in socketpair()
96 return socketpair_win32(domain, type, protocol, sock, 1); in socketpair()