Lines Matching refs:acceptedSocket
299 void socketpair(int *clientSocket, int *serverSocket, int *acceptedSocket) { in socketpair() argument
313 *acceptedSocket = accept(*serverSocket, (struct sockaddr *) &server6, &addrlen); in socketpair()
314 ASSERT_NE(-1, *acceptedSocket); in socketpair()
319 void checkSocketpairOpen(int clientSocket, int acceptedSocket) { in checkSocketpairOpen() argument
322 EXPECT_EQ(4, read(acceptedSocket, buf, sizeof(buf))); in checkSocketpairOpen()
326 void checkSocketpairClosed(int clientSocket, int acceptedSocket) { in checkSocketpairClosed() argument
334 ret = write(acceptedSocket, "foo", sizeof("foo")); in checkSocketpairClosed()
341 int clientSocket, serverSocket, acceptedSocket; in TEST_F() local
342 ASSERT_NO_FATAL_FAILURE(socketpair(&clientSocket, &serverSocket, &acceptedSocket)); in TEST_F()
362 checkSocketpairOpen(clientSocket, acceptedSocket); in TEST_F()
375 checkSocketpairOpen(clientSocket, acceptedSocket); in TEST_F()
380 checkSocketpairClosed(clientSocket, acceptedSocket); in TEST_F()
384 close(acceptedSocket); in TEST_F()