Commit e47087b7 authored by Orvid King's avatar Orvid King Committed by Facebook Github Bot

NetworkSocket support for BlockingSocket

Summary: Just keep porting, just keep porting.

Reviewed By: yfeldblum

Differential Revision: D12818498

fbshipit-source-id: 48d404ed17caa79c241e2facc1a3d93715ce02cb
parent c7b21fd1
...@@ -19,11 +19,14 @@ ...@@ -19,11 +19,14 @@
#include <folly/io/async/AsyncSSLSocket.h> #include <folly/io/async/AsyncSSLSocket.h>
#include <folly/io/async/AsyncSocket.h> #include <folly/io/async/AsyncSocket.h>
#include <folly/io/async/SSLContext.h> #include <folly/io/async/SSLContext.h>
#include <folly/net/NetworkSocket.h>
class BlockingSocket : public folly::AsyncSocket::ConnectCallback, class BlockingSocket : public folly::AsyncSocket::ConnectCallback,
public folly::AsyncTransportWrapper::ReadCallback, public folly::AsyncTransportWrapper::ReadCallback,
public folly::AsyncTransportWrapper::WriteCallback { public folly::AsyncTransportWrapper::WriteCallback {
public: public:
explicit BlockingSocket(folly::NetworkSocket fd)
: sock_(new folly::AsyncSocket(&eventBase_, fd)) {}
explicit BlockingSocket(int fd) explicit BlockingSocket(int fd)
: sock_(new folly::AsyncSocket(&eventBase_, fd)) {} : sock_(new folly::AsyncSocket(&eventBase_, fd)) {}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment