* limitations under the License.
*/
+#include <thread>
+
+#include <folly/Conv.h>
#include <folly/SocketAddress.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/io/IOBuf.h>
+#include <folly/portability/GMock.h>
#include <folly/portability/GTest.h>
-#include <thread>
-
using folly::AsyncUDPSocket;
using folly::AsyncUDPServerSocket;
using folly::AsyncTimeout;
using folly::EventBase;
using folly::SocketAddress;
using folly::IOBuf;
+using namespace testing;
class UDPAcceptor
: public AsyncUDPServerSocket::Callback {
// Wait for server thread to joib
serverThread.join();
}
+
+class TestAsyncUDPSocket : public AsyncUDPSocket {
+ public:
+ explicit TestAsyncUDPSocket(EventBase* evb) : AsyncUDPSocket(evb) {}
+
+ MOCK_METHOD3(sendmsg, ssize_t(int, const struct msghdr*, int));
+};