Udp Acceptor
authorDave Watson <davejwatson@fb.com>
Fri, 20 Mar 2015 16:54:08 +0000 (09:54 -0700)
committerNoam Lerner <noamler@fb.com>
Wed, 25 Mar 2015 22:34:48 +0000 (15:34 -0700)
commit4abb466901ce3fa3cc0b1f446f8f7a1bb67e715f
tree1b8db9649c0af2da5d4f01c161d07921d77c1d36
parent3e3b5e3566a9036fd86525d62a9ad110e72861b7
Udp Acceptor

Summary:
major changes:

1) ServerSocketFactory and AsyncSocketBase to abstract the differences between UDP and TCP async socket.  Could possibly push some of this to the sockets themselves eventually
2) pipeline() is a pipeline between accept/receive of a UDP message, and before sending it to workers.  Default impl for TCP is to fan out to worker threads.  This is the same as Netty.  Since we don't know if the data is a TCP socket or a UDP message, it's a void*, which sucks (netty uses Object msg, so it isn't any different).

Test Plan: Added lots of new tests.  Doesn't test any data passing yet though, just connects/simple receipt of UDP message.

Reviewed By: hans@fb.com

Subscribers: alandau, bmatheny, mshneer, jsedgwick, yfeldblum, trunkagent, doug, fugalh, folly-diffs@

FB internal diff: D1736670

Tasks: 5788116

Signature: t1:1736670:1424372992:e109450604ed905004bd40dfbb508b5808332c15
12 files changed:
folly/Makefile.am
folly/io/async/AsyncServerSocket.h
folly/io/async/AsyncSocketBase.h [new file with mode: 0644]
folly/io/async/AsyncTransport.h
folly/io/async/AsyncUDPServerSocket.h
folly/io/async/AsyncUDPSocket.h
folly/wangle/acceptor/Acceptor.h
folly/wangle/bootstrap/BootstrapTest.cpp
folly/wangle/bootstrap/ServerBootstrap-inl.h
folly/wangle/bootstrap/ServerBootstrap.cpp
folly/wangle/bootstrap/ServerBootstrap.h
folly/wangle/bootstrap/ServerSocketFactory.h [new file with mode: 0644]