Lines Matching refs:sock
64 static bool SendString(Socket* sock, const std::string& message) { in SendString() argument
65 return sock->Send(message.c_str(), message.length()); in SendString()
70 static bool ReceiveString(Socket* sock, const std::string& message) { in ReceiveString() argument
72 ssize_t bytes = sock->ReceiveAll(&received[0], received.length(), kTestTimeoutMs); in ReceiveString()
175 std::unique_ptr<Socket> sock = Socket::NewServer(Socket::Protocol::kUdp, 0); in TEST() local
184 sock->socket_send_buffers_function_ = [&buffers, &mock_return_value]( in TEST()
196 EXPECT_TRUE(sock->Send(buffers)); in TEST()
199 EXPECT_FALSE(sock->Send(buffers)); in TEST()
202 EXPECT_FALSE(sock->Send(buffers)); in TEST()
205 EXPECT_FALSE(sock->Send(buffers)); in TEST()
212 std::unique_ptr<Socket> sock = Socket::NewServer(Socket::Protocol::kTcp, 0); in TEST() local
243 sock->socket_send_buffers_function_ = [&bytes_sent, &data, &expect_success, &test]( in TEST()
278 EXPECT_EQ(expect_success, sock->Send(buffers)); in TEST()