Lines Matching refs:client
36 std::unique_ptr<Socket>* client, in MakeConnectedSockets() argument
44 *client = Socket::NewClient(protocol, hostname, (*server)->GetLocalPort(), nullptr); in MakeConnectedSockets()
45 if (*client == nullptr) { in MakeConnectedSockets()
78 std::unique_ptr<Socket> server, client; in TEST() local
81 ASSERT_TRUE(MakeConnectedSockets(protocol, &server, &client)); in TEST()
83 EXPECT_TRUE(SendString(client.get(), "foo")); in TEST()
87 EXPECT_TRUE(ReceiveString(client.get(), "bar baz")); in TEST()
92 std::unique_ptr<Socket> server, client; in TEST() local
96 ASSERT_TRUE(MakeConnectedSockets(protocol, &server, &client)); in TEST()
101 EXPECT_EQ(-1, client->Receive(buffer, sizeof(buffer), kShortTimeoutMs)); in TEST()
102 EXPECT_TRUE(client->ReceiveTimedOut()); in TEST()
106 ASSERT_TRUE(MakeConnectedSockets(Socket::Protocol::kUdp, &server, &client)); in TEST()
108 EXPECT_EQ(-1, client->Receive(buffer, sizeof(buffer), kShortTimeoutMs)); in TEST()
109 EXPECT_TRUE(client->ReceiveTimedOut()); in TEST()
113 std::unique_ptr<Socket> server, client; in TEST() local
117 ASSERT_TRUE(MakeConnectedSockets(protocol, &server, &client)); in TEST()
123 EXPECT_EQ(0, client->Close()); in TEST()
124 EXPECT_EQ(-1, client->Receive(buffer, sizeof(buffer), kTestTimeoutMs)); in TEST()
125 EXPECT_FALSE(client->ReceiveTimedOut()); in TEST()
129 ASSERT_TRUE(MakeConnectedSockets(Socket::Protocol::kTcp, &server, &client)); in TEST()
131 EXPECT_EQ(0, client->Receive(buffer, sizeof(buffer), kTestTimeoutMs)); in TEST()
132 EXPECT_FALSE(client->ReceiveTimedOut()); in TEST()
138 std::unique_ptr<Socket> server, client; in TEST() local
141 ASSERT_TRUE(MakeConnectedSockets(protocol, &server, &client)); in TEST()
150 EXPECT_TRUE(SendString(client.get(), message)); in TEST()
158 std::unique_ptr<Socket> server, client; in TEST() local
159 ASSERT_TRUE(MakeConnectedSockets(Socket::Protocol::kUdp, &server, &client)); in TEST()
161 EXPECT_TRUE(SendString(client.get(), "1234567890")); in TEST()