Lines Matching refs:AsyncSocket
236 std::unique_ptr<AsyncSocket> client( in ConnectInternal()
239 EXPECT_EQ(AsyncSocket::CS_CLOSED, client->GetState()); in ConnectInternal()
243 std::unique_ptr<AsyncSocket> server( in ConnectInternal()
248 EXPECT_EQ(AsyncSocket::CS_CONNECTING, server->GetState()); in ConnectInternal()
261 EXPECT_EQ(AsyncSocket::CS_CONNECTING, client->GetState()); in ConnectInternal()
267 std::unique_ptr<AsyncSocket> accepted(server->Accept(&accept_addr)); in ConnectInternal()
273 EXPECT_EQ(AsyncSocket::CS_CONNECTED, accepted->GetState()); in ConnectInternal()
278 EXPECT_EQ_WAIT(AsyncSocket::CS_CONNECTED, client->GetState(), kTimeout); in ConnectInternal()
291 std::unique_ptr<AsyncSocket> client( in ConnectWithDnsLookupInternal()
296 std::unique_ptr<AsyncSocket> server( in ConnectWithDnsLookupInternal()
310 EXPECT_EQ(AsyncSocket::CS_CONNECTING, client->GetState()); in ConnectWithDnsLookupInternal()
316 std::unique_ptr<AsyncSocket> accepted(server->Accept(&accept_addr)); in ConnectWithDnsLookupInternal()
322 EXPECT_EQ(AsyncSocket::CS_CONNECTED, accepted->GetState()); in ConnectWithDnsLookupInternal()
327 EXPECT_EQ_WAIT(AsyncSocket::CS_CONNECTED, client->GetState(), kTimeout); in ConnectWithDnsLookupInternal()
339 std::unique_ptr<AsyncSocket> client( in ConnectFailInternal()
344 std::unique_ptr<AsyncSocket> server( in ConnectFailInternal()
356 EXPECT_EQ_WAIT(AsyncSocket::CS_CLOSED, client->GetState(), kTimeout); in ConnectFailInternal()
372 std::unique_ptr<AsyncSocket> client( in ConnectWithDnsLookupFailInternal()
377 std::unique_ptr<AsyncSocket> server( in ConnectWithDnsLookupFailInternal()
390 WAIT_(client->GetState() == AsyncSocket::CS_CLOSED, kTimeout, in ConnectWithDnsLookupFailInternal()
398 EXPECT_EQ_WAIT(AsyncSocket::CS_CLOSED, client->GetState(), kTimeout); in ConnectWithDnsLookupFailInternal()
410 std::unique_ptr<AsyncSocket> server( in ConnectWithClosedSocketInternal()
416 std::unique_ptr<AsyncSocket> client( in ConnectWithClosedSocketInternal()
419 EXPECT_EQ(AsyncSocket::CS_CLOSED, client->GetState()); in ConnectWithClosedSocketInternal()
423 EXPECT_EQ(AsyncSocket::CS_CONNECTING, client->GetState()); in ConnectWithClosedSocketInternal()
429 std::unique_ptr<AsyncSocket> server( in ConnectWhileNotClosedInternal()
435 std::unique_ptr<AsyncSocket> client( in ConnectWhileNotClosedInternal()
438 EXPECT_EQ(AsyncSocket::CS_CONNECTING, client->GetState()); in ConnectWhileNotClosedInternal()
446 std::unique_ptr<AsyncSocket> accepted(server->Accept(&accept_addr)); in ConnectWhileNotClosedInternal()
451 EXPECT_EQ(AsyncSocket::CS_CONNECTED, accepted->GetState()); in ConnectWhileNotClosedInternal()
454 EXPECT_EQ_WAIT(AsyncSocket::CS_CONNECTED, client->GetState(), kTimeout); in ConnectWhileNotClosedInternal()
462 EXPECT_EQ(AsyncSocket::CS_CONNECTED, accepted->GetState()); in ConnectWhileNotClosedInternal()
463 EXPECT_EQ(AsyncSocket::CS_CONNECTED, client->GetState()); in ConnectWhileNotClosedInternal()
472 std::unique_ptr<AsyncSocket> client( in ServerCloseDuringConnectInternal()
477 std::unique_ptr<AsyncSocket> server( in ServerCloseDuringConnectInternal()
491 EXPECT_EQ_WAIT(AsyncSocket::CS_CLOSED, client->GetState(), kTimeout); in ServerCloseDuringConnectInternal()
501 std::unique_ptr<AsyncSocket> client( in ClientCloseDuringConnectInternal()
506 std::unique_ptr<AsyncSocket> server( in ClientCloseDuringConnectInternal()
520 std::unique_ptr<AsyncSocket> accepted(server->Accept(&accept_addr)); in ClientCloseDuringConnectInternal()
523 EXPECT_EQ(AsyncSocket::CS_CONNECTED, accepted->GetState()); in ClientCloseDuringConnectInternal()
526 EXPECT_EQ_WAIT(AsyncSocket::CS_CLOSED, accepted->GetState(), kTimeout); in ClientCloseDuringConnectInternal()
539 std::unique_ptr<AsyncSocket> client( in ServerCloseInternal()
544 std::unique_ptr<AsyncSocket> server( in ServerCloseInternal()
555 std::unique_ptr<AsyncSocket> accepted(server->Accept(&accept_addr)); in ServerCloseInternal()
560 EXPECT_EQ_WAIT(AsyncSocket::CS_CONNECTED, client->GetState(), kTimeout); in ServerCloseInternal()
568 EXPECT_EQ(AsyncSocket::CS_CLOSED, accepted->GetState()); in ServerCloseInternal()
573 EXPECT_EQ(AsyncSocket::CS_CONNECTED, client->GetState()); in ServerCloseInternal()
581 EXPECT_EQ_WAIT(AsyncSocket::CS_CLOSED, client->GetState(), kTimeout); in ServerCloseInternal()
601 void OnClose(AsyncSocket* socket, int error) { in OnClose()
613 std::unique_ptr<AsyncSocket> client( in CloseInClosedCallbackInternal()
619 std::unique_ptr<AsyncSocket> server( in CloseInClosedCallbackInternal()
630 std::unique_ptr<AsyncSocket> accepted(server->Accept(&accept_addr)); in CloseInClosedCallbackInternal()
635 EXPECT_EQ_WAIT(AsyncSocket::CS_CONNECTED, client->GetState(), kTimeout); in CloseInClosedCallbackInternal()
642 EXPECT_EQ(AsyncSocket::CS_CLOSED, accepted->GetState()); in CloseInClosedCallbackInternal()
646 EXPECT_EQ(AsyncSocket::CS_CONNECTED, client->GetState()); in CloseInClosedCallbackInternal()
649 EXPECT_EQ_WAIT(AsyncSocket::CS_CLOSED, client->GetState(), kTimeout); in CloseInClosedCallbackInternal()
664 std::unique_ptr<AsyncSocket> client( in SocketServerWaitInternal()
666 std::unique_ptr<AsyncSocket> server( in SocketServerWaitInternal()
676 std::unique_ptr<AsyncSocket> accepted(server->Accept(&accept_addr)); in SocketServerWaitInternal()
679 EXPECT_EQ(AsyncSocket::CS_CONNECTED, accepted->GetState()); in SocketServerWaitInternal()
683 EXPECT_EQ_WAIT(AsyncSocket::CS_CONNECTED, client->GetState(), kTimeout); in SocketServerWaitInternal()
700 TypedMessageData<AsyncSocket*> data(client.get()); in SocketServerWaitInternal()
716 std::unique_ptr<AsyncSocket> receiver( in TcpInternal()
721 std::unique_ptr<AsyncSocket> server( in TcpInternal()
732 std::unique_ptr<AsyncSocket> sender(server->Accept(&accept_addr)); in TcpInternal()
737 EXPECT_EQ_WAIT(AsyncSocket::CS_CONNECTED, receiver->GetState(), kTimeout); in TcpInternal()
832 EXPECT_EQ_WAIT(AsyncSocket::CS_CLOSED, receiver->GetState(), kTimeout); in TcpInternal()
842 std::unique_ptr<AsyncSocket> client( in SingleFlowControlCallbackInternal()
847 std::unique_ptr<AsyncSocket> server( in SingleFlowControlCallbackInternal()
858 std::unique_ptr<AsyncSocket> accepted(server->Accept(&accept_addr)); in SingleFlowControlCallbackInternal()
863 EXPECT_EQ_WAIT(AsyncSocket::CS_CONNECTED, client->GetState(), kTimeout); in SingleFlowControlCallbackInternal()
909 AsyncSocket* socket = ss_->CreateAsyncSocket(loopback.family(), SOCK_DGRAM); in UdpInternal()
910 EXPECT_EQ(AsyncSocket::CS_CLOSED, socket->GetState()); in UdpInternal()
914 EXPECT_EQ(AsyncSocket::CS_CONNECTED, socket->GetState()); in UdpInternal()
916 EXPECT_EQ(AsyncSocket::CS_CLOSED, socket->GetState()); in UdpInternal()
999 std::unique_ptr<AsyncSocket> socket( in GetSetOptionsInternal()