proxygen
folly::ZeroCopyTestAsyncSocket::Callback Class Reference
Inheritance diagram for folly::ZeroCopyTestAsyncSocket::Callback:
folly::AsyncSocket::ConnectCallback

Public Member Functions

 Callback (ZeroCopyTestAsyncSocket *parent)
 
void connectSuccess () noexceptoverride
 
void connectErr (const folly::AsyncSocketException &ex) noexceptoverride
 
void getReadBuffer (void **bufReturn, size_t *lenReturn) override
 
void readDataAvailable (size_t len) noexceptoverride
 
void readEOF () noexceptoverride
 
void readErr (const folly::AsyncSocketException &ex) noexceptoverride
 
- Public Member Functions inherited from folly::AsyncSocket::ConnectCallback
virtual ~ConnectCallback ()=default
 

Private Attributes

ZeroCopyTestAsyncSocketparent_ {nullptr}
 

Detailed Description

Definition at line 96 of file ZeroCopy.h.

Constructor & Destructor Documentation

folly::ZeroCopyTestAsyncSocket::Callback::Callback ( ZeroCopyTestAsyncSocket parent)
inlineexplicit

Definition at line 99 of file ZeroCopy.h.

99 : parent_(parent) {}
ZeroCopyTestAsyncSocket * parent_
Definition: ZeroCopy.h:128
folly::Function< void()> parent
Definition: AtFork.cpp:34

Member Function Documentation

void folly::ZeroCopyTestAsyncSocket::Callback::connectErr ( const folly::AsyncSocketException ex)
inlineoverridevirtualnoexcept

connectErr() will be invoked if the connection attempt fails.

Parameters
exAn exception describing the error that occurred.

Implements folly::AsyncSocket::ConnectCallback.

Definition at line 106 of file ZeroCopy.h.

References folly::ZeroCopyTestAsyncSocket::onDataFinish(), and parent_.

106  {
107  LOG(ERROR) << "Connect error: " << ex.what();
109  }
ZeroCopyTestAsyncSocket * parent_
Definition: ZeroCopy.h:128
void onDataFinish(folly::exception_wrapper)
Definition: ZeroCopy.h:170
void folly::ZeroCopyTestAsyncSocket::Callback::connectSuccess ( )
inlineoverridevirtualnoexcept

connectSuccess() will be invoked when the connection has been successfully established.

Implements folly::AsyncSocket::ConnectCallback.

Definition at line 101 of file ZeroCopy.h.

References folly::ZeroCopyTestAsyncSocket::onConnected(), parent_, and folly::ZeroCopyTestAsyncSocket::sock_.

101  {
102  parent_->sock_->setReadCB(this);
103  parent_->onConnected();
104  }
folly::AsyncSocket::UniquePtr sock_
Definition: ZeroCopy.h:202
ZeroCopyTestAsyncSocket * parent_
Definition: ZeroCopy.h:128
void folly::ZeroCopyTestAsyncSocket::Callback::getReadBuffer ( void **  bufReturn,
size_t *  lenReturn 
)
inlineoverride

Definition at line 111 of file ZeroCopy.h.

References folly::ZeroCopyTestAsyncSocket::getReadBuffer(), and parent_.

111  {
112  parent_->getReadBuffer(bufReturn, lenReturn);
113  }
void getReadBuffer(void **bufReturn, size_t *lenReturn)
Definition: ZeroCopy.h:137
ZeroCopyTestAsyncSocket * parent_
Definition: ZeroCopy.h:128
void folly::ZeroCopyTestAsyncSocket::Callback::readDataAvailable ( size_t  len)
inlineoverridenoexcept

Definition at line 115 of file ZeroCopy.h.

References parent_, and folly::ZeroCopyTestAsyncSocket::readDataAvailable().

115  {
117  }
void readDataAvailable(size_t len) noexcept
Definition: ZeroCopy.h:142
ZeroCopyTestAsyncSocket * parent_
Definition: ZeroCopy.h:128
void folly::ZeroCopyTestAsyncSocket::Callback::readEOF ( )
inlineoverridenoexcept

Definition at line 119 of file ZeroCopy.h.

References folly::ZeroCopyTestAsyncSocket::onDataFinish(), and parent_.

119  {
121  }
ZeroCopyTestAsyncSocket * parent_
Definition: ZeroCopy.h:128
void onDataFinish(folly::exception_wrapper)
Definition: ZeroCopy.h:170
void folly::ZeroCopyTestAsyncSocket::Callback::readErr ( const folly::AsyncSocketException ex)
inlineoverridenoexcept

Definition at line 123 of file ZeroCopy.h.

References folly::ZeroCopyTestAsyncSocket::onDataFinish(), and parent_.

123  {
125  }
ZeroCopyTestAsyncSocket * parent_
Definition: ZeroCopy.h:128
void onDataFinish(folly::exception_wrapper)
Definition: ZeroCopy.h:170

Member Data Documentation

ZeroCopyTestAsyncSocket* folly::ZeroCopyTestAsyncSocket::Callback::parent_ {nullptr}
private

The documentation for this class was generated from the following file: