Lines Matching refs:acceptedSocket
152 static void fakeRemoteSocketPair(int *clientSocket, int *serverSocket, int *acceptedSocket);
662 void BinderTest::fakeRemoteSocketPair(int *clientSocket, int *serverSocket, int *acceptedSocket) { in fakeRemoteSocketPair() argument
677 *acceptedSocket = accept4(*serverSocket, (struct sockaddr *) &server6, &addrlen, SOCK_CLOEXEC); in fakeRemoteSocketPair()
678 ASSERT_NE(-1, *acceptedSocket); in fakeRemoteSocketPair()
683 void checkSocketpairOpen(int clientSocket, int acceptedSocket) { in checkSocketpairOpen() argument
686 EXPECT_EQ(4, read(acceptedSocket, buf, sizeof(buf))); in checkSocketpairOpen()
690 void checkSocketpairClosed(int clientSocket, int acceptedSocket) { in checkSocketpairClosed() argument
698 ret = write(acceptedSocket, "foo", sizeof("foo")); in checkSocketpairClosed()
705 int clientSocket, serverSocket, acceptedSocket; in TEST_F() local
706 ASSERT_NO_FATAL_FAILURE(fakeRemoteSocketPair(&clientSocket, &serverSocket, &acceptedSocket)); in TEST_F()
726 checkSocketpairOpen(clientSocket, acceptedSocket); in TEST_F()
739 checkSocketpairOpen(clientSocket, acceptedSocket); in TEST_F()
744 checkSocketpairClosed(clientSocket, acceptedSocket); in TEST_F()
748 close(acceptedSocket); in TEST_F()