Lines Matching refs:sock
31 PHPAPI int socketpair(int domain, int type, int protocol, SOCKET sock[2]) in socketpair()
42 sock[0] = sock[1] = redirect = INVALID_SOCKET; in socketpair()
45 sock[0] = socket(domain, type, protocol); in socketpair()
46 if (INVALID_SOCKET == sock[0]) { in socketpair()
54 if (bind(sock[0], (struct sockaddr*)&address, sizeof(address)) != 0) { in socketpair()
58 if(getsockname(sock[0], (struct sockaddr *)&address, &size) != 0) { in socketpair()
62 if (listen(sock[0], 2) != 0) { in socketpair()
66 sock[1] = socket(domain, type, protocol); in socketpair()
67 if (INVALID_SOCKET == sock[1]) { in socketpair()
72 if(connect(sock[1], (struct sockaddr*)&address, sizeof(address)) != 0) { in socketpair()
76 redirect = accept(sock[0],(struct sockaddr*)&address, &size); in socketpair()
81 closesocket(sock[0]); in socketpair()
82 sock[0] = redirect; in socketpair()
88 closesocket(sock[0]); in socketpair()
89 closesocket(sock[1]); in socketpair()