|
proxygen
|
#include <thread>#include <folly/Conv.h>#include <folly/SocketAddress.h>#include <folly/String.h>#include <folly/io/IOBuf.h>#include <folly/io/async/AsyncTimeout.h>#include <folly/io/async/AsyncUDPServerSocket.h>#include <folly/io/async/AsyncUDPSocket.h>#include <folly/io/async/EventBase.h>#include <folly/portability/GMock.h>#include <folly/portability/GTest.h>#include <folly/portability/Sockets.h>Go to the source code of this file.
Classes | |
| class | UDPAcceptor |
| class | UDPServer |
| class | UDPClient |
| class | ConnectedWriteUDPClient |
| class | AsyncSocketIntegrationTest |
| class | TestAsyncUDPSocket |
| class | MockErrMessageCallback |
| class | MockUDPReadCallback |
| class | AsyncUDPSocketTest |
Functions | |
| TEST_F (AsyncSocketIntegrationTest, PingPong) | |
| TEST_F (AsyncSocketIntegrationTest, ConnectedPingPong) | |
| TEST_F (AsyncSocketIntegrationTest, ConnectedPingPongServerWrongAddress) | |
| TEST_F (AsyncSocketIntegrationTest, ConnectedPingPongClientWrongAddress) | |
| TEST_F (AsyncSocketIntegrationTest, PingPongUseConnectedSendMsg) | |
| TEST_F (AsyncSocketIntegrationTest, PingPongUseConnectedSendMsgServerWrongAddr) | |
| TEST_F (AsyncSocketIntegrationTest, PingPongPauseResumeListening) | |
| TEST_F (AsyncUDPSocketTest, TestConnect) | |
| TEST_F (AsyncUDPSocketTest, TestErrToNonExistentServer) | |
| TEST_F (AsyncUDPSocketTest, TestUnsetErrCallback) | |
| TEST_F (AsyncUDPSocketTest, CloseInErrorCallback) | |
| TEST_F (AsyncUDPSocketTest, TestNonExistentServerNoErrCb) | |
| TEST_F (AsyncUDPSocketTest, TestBound) | |
| TEST_F (AsyncUDPSocketTest, TestAttachAfterDetachEvbWithReadCallback) | |
| TEST_F (AsyncUDPSocketTest, TestAttachAfterDetachEvbNoReadCallback) | |
| TEST_F (AsyncUDPSocketTest, TestDetachAttach) | |
| TEST_F | ( | AsyncSocketIntegrationTest | , |
| PingPong | |||
| ) |
| TEST_F | ( | AsyncSocketIntegrationTest | , |
| ConnectedPingPong | |||
| ) |
| TEST_F | ( | AsyncSocketIntegrationTest | , |
| ConnectedPingPongServerWrongAddress | |||
| ) |
| TEST_F | ( | AsyncSocketIntegrationTest | , |
| ConnectedPingPongClientWrongAddress | |||
| ) |
Definition at line 417 of file AsyncUDPSocketTest.cpp.
References ASSERT_EQ.
| TEST_F | ( | AsyncSocketIntegrationTest | , |
| PingPongUseConnectedSendMsg | |||
| ) |
| TEST_F | ( | AsyncSocketIntegrationTest | , |
| PingPongUseConnectedSendMsgServerWrongAddr | |||
| ) |
| TEST_F | ( | AsyncSocketIntegrationTest | , |
| PingPongPauseResumeListening | |||
| ) |
Definition at line 443 of file AsyncUDPSocketTest.cpp.
References ASSERT_EQ, ASSERT_GT, and folly::none.
| TEST_F | ( | AsyncUDPSocketTest | , |
| TestConnect | |||
| ) |
| TEST_F | ( | AsyncUDPSocketTest | , |
| TestErrToNonExistentServer | |||
| ) |
Definition at line 531 of file AsyncUDPSocketTest.cpp.
References testing::_, addr, folly::IOBuf::copyBuffer(), evb_, EXPECT_CALL, EXPECT_TRUE, testing::Invoke(), folly::EventBase::loopForever(), socket_, and folly::EventBase::terminateLoopSoon().
| TEST_F | ( | AsyncUDPSocketTest | , |
| TestUnsetErrCallback | |||
| ) |
Definition at line 556 of file AsyncUDPSocketTest.cpp.
References testing::_, addr, folly::IOBuf::copyBuffer(), evb_, EXPECT_CALL, folly::EventBase::loopForever(), folly::HHWheelTimer::scheduleTimeoutFn(), socket_, folly::EventBase::terminateLoopSoon(), and folly::EventBase::timer().
| TEST_F | ( | AsyncUDPSocketTest | , |
| CloseInErrorCallback | |||
| ) |
Definition at line 568 of file AsyncUDPSocketTest.cpp.
References testing::_, addr, folly::IOBuf::copyBuffer(), evb_, EXPECT_CALL, EXPECT_TRUE, testing::Invoke(), folly::EventBase::loopForever(), socket_, and folly::EventBase::terminateLoopSoon().
| TEST_F | ( | AsyncUDPSocketTest | , |
| TestNonExistentServerNoErrCb | |||
| ) |
Definition at line 584 of file AsyncUDPSocketTest.cpp.
References testing::_, addr, folly::IOBuf::copyBuffer(), evb_, EXPECT_CALL, EXPECT_FALSE, testing::Invoke(), folly::EventBase::loopForever(), ON_CALL, folly::IOBufQueue::preallocate(), fizz::detail::readBuf(), folly::HHWheelTimer::scheduleTimeoutFn(), socket_, folly::EventBase::terminateLoopSoon(), and folly::EventBase::timer().
| TEST_F | ( | AsyncUDPSocketTest | , |
| TestBound | |||
| ) |
Definition at line 606 of file AsyncUDPSocketTest.cpp.
References folly::AsyncUDPSocket::bind(), evb_, EXPECT_FALSE, EXPECT_TRUE, folly::AsyncUDPSocket::isBound(), and folly::netops::socket().
| TEST_F | ( | AsyncUDPSocketTest | , |
| TestAttachAfterDetachEvbWithReadCallback | |||
| ) |
Definition at line 614 of file AsyncUDPSocketTest.cpp.
References evb_, EXPECT_FALSE, EXPECT_TRUE, and socket_.
| TEST_F | ( | AsyncUDPSocketTest | , |
| TestAttachAfterDetachEvbNoReadCallback | |||
| ) |
| TEST_F | ( | AsyncUDPSocketTest | , |
| TestDetachAttach | |||
| ) |
Definition at line 631 of file AsyncUDPSocketTest.cpp.
References testing::_, folly::IOBuf::copyBuffer(), data, evb_, EXPECT_CALL, EXPECT_EQ, testing::Invoke(), folly::EventBase::loopForever(), folly::EventBase::loopOnce(), now(), folly::EventBase::runInEventBaseThread(), folly::EventBase::runInEventBaseThreadAndWait(), socket_, folly::pushmi::detail::t, and folly::EventBase::terminateLoopSoon().