proxygen
folly::SendMsgParamsCallbackBase Class Reference

#include <AsyncSSLSocketTest.h>

Inheritance diagram for folly::SendMsgParamsCallbackBase:
folly::AsyncSocket::SendMsgParamsCallback folly::SendMsgFlagsCallback folly::SendMsgDataCallback

Public Member Functions

 SendMsgParamsCallbackBase ()
 
void setSocket (const std::shared_ptr< AsyncSSLSocket > &socket)
 
int getFlagsImpl (folly::WriteFlags flags, int) noexceptoverride
 
void getAncillaryData (folly::WriteFlags flags, void *data) noexceptoverride
 
uint32_t getAncillaryDataSize (folly::WriteFlags flags) noexceptoverride
 
- Public Member Functions inherited from folly::AsyncSocket::SendMsgParamsCallback
virtual ~SendMsgParamsCallback ()=default
 
int getFlags (folly::WriteFlags flags, bool zeroCopyEnabled) noexcept
 

Public Attributes

std::shared_ptr< AsyncSSLSocketsocket_
 
folly::AsyncSocket::SendMsgParamsCallbackoldCallback_ {nullptr}
 

Additional Inherited Members

- Static Public Attributes inherited from folly::AsyncSocket::SendMsgParamsCallback
static const size_t maxAncillaryDataSize {0x5000}
 

Detailed Description

Definition at line 50 of file AsyncSSLSocketTest.h.

Constructor & Destructor Documentation

folly::SendMsgParamsCallbackBase::SendMsgParamsCallbackBase ( )
inline

Definition at line 53 of file AsyncSSLSocketTest.h.

53 {}

Member Function Documentation

void folly::SendMsgParamsCallbackBase::getAncillaryData ( folly::WriteFlags  ,
void *   
)
inlineoverridevirtualnoexcept

getAncillaryData() will be invoked to initialize ancillary data buffer referred by "msg_control" field of msghdr structure passed to sendmsg() system call. The function assumes that the size of buffer is not smaller than the value returned by getAncillaryDataSize() method for the same combination of flags.

Parameters
flagsWrite flags requested for the given write operation
dataPointer to ancillary data buffer to initialize.

Reimplemented from folly::AsyncSocket::SendMsgParamsCallback.

Reimplemented in folly::SendMsgDataCallback.

Definition at line 67 of file AsyncSSLSocketTest.h.

References folly::data(), folly::AsyncSocket::SendMsgParamsCallback::getAncillaryData(), and oldCallback_.

67  {
69  }
flags
Definition: http_parser.h:127
folly::AsyncSocket::SendMsgParamsCallback * oldCallback_
virtual void getAncillaryData(folly::WriteFlags, void *) noexcept
Definition: AsyncSocket.h:170
constexpr auto data(C &c) -> decltype(c.data())
Definition: Access.h:71
uint32_t folly::SendMsgParamsCallbackBase::getAncillaryDataSize ( folly::WriteFlags  )
inlineoverridevirtualnoexcept

getAncillaryDataSize() will be invoked to retrieve the size of ancillary data buffer which should be passed to sendmsg() system call

Parameters
flagsWrite flags requested for the given write operation

Reimplemented from folly::AsyncSocket::SendMsgParamsCallback.

Reimplemented in folly::SendMsgDataCallback.

Definition at line 71 of file AsyncSSLSocketTest.h.

References folly::AsyncSocket::SendMsgParamsCallback::getAncillaryDataSize(), and oldCallback_.

71  {
73  }
flags
Definition: http_parser.h:127
folly::AsyncSocket::SendMsgParamsCallback * oldCallback_
virtual uint32_t getAncillaryDataSize(folly::WriteFlags) noexcept
Definition: AsyncSocket.h:180
int folly::SendMsgParamsCallbackBase::getFlagsImpl ( folly::WriteFlags  ,
int  defaultFlags 
)
inlineoverridevirtualnoexcept

getFlagsImpl() will be invoked by getFlags(folly::WriteFlags flags) method to retrieve the flags to be passed to sendmsg() system call. SendMsgParamsCallback::getFlags() is calling this method, and returns its results directly to the caller in AsyncSocket. Classes inheriting from SendMsgParamsCallback are welcome to override this method to force SendMsgParamsCallback to return its own set of flags.

Parameters
flagsWrite flags requested for the given write operation
defaultflagsA set of message flags returned by getDefaultFlags() method for the given "flags" mask.

Reimplemented from folly::AsyncSocket::SendMsgParamsCallback.

Reimplemented in folly::SendMsgFlagsCallback.

Definition at line 61 of file AsyncSSLSocketTest.h.

References folly::AsyncSocket::SendMsgParamsCallback::getFlags(), and oldCallback_.

63  {
64  return oldCallback_->getFlags(flags, false /*zeroCopyEnabled*/);
65  }
flags
Definition: http_parser.h:127
folly::AsyncSocket::SendMsgParamsCallback * oldCallback_
int getFlags(folly::WriteFlags flags, bool zeroCopyEnabled) noexcept
Definition: AsyncSocket.h:156
void folly::SendMsgParamsCallbackBase::setSocket ( const std::shared_ptr< AsyncSSLSocket > &  socket)
inline

Definition at line 55 of file AsyncSSLSocketTest.h.

References oldCallback_, folly::netops::socket(), and socket_.

Referenced by folly::ExpectWriteErrorCallback::~ExpectWriteErrorCallback().

55  {
56  socket_ = socket;
57  oldCallback_ = socket_->getSendMsgParamsCB();
58  socket_->setSendMsgParamCB(this);
59  }
folly::AsyncSocket::SendMsgParamsCallback * oldCallback_
NetworkSocket socket(int af, int type, int protocol)
Definition: NetOps.cpp:412
std::shared_ptr< AsyncSSLSocket > socket_

Member Data Documentation

std::shared_ptr<AsyncSSLSocket> folly::SendMsgParamsCallbackBase::socket_

Definition at line 75 of file AsyncSSLSocketTest.h.

Referenced by folly::AlpnClient::AlpnClient(), folly::AlpnServer::AlpnServer(), folly::BlockingWriteClient::BlockingWriteClient(), folly::BlockingWriteServer::BlockingWriteServer(), folly::HandshakeCallback::closeSocket(), folly::HandshakeCallback::getSocket(), folly::HandshakeCallback::handshakeSuc(), folly::BlockingWriteClient::handshakeSuc(), folly::BlockingWriteServer::handshakeSuc(), folly::AlpnClient::handshakeSuc(), folly::AlpnServer::handshakeSuc(), folly::RenegotiatingServer::handshakeSuc(), folly::SNIClient::handshakeSuc(), folly::SSLHandshakeBase::moveSocket(), folly::ReadCallback::readDataAvailable(), folly::WriteErrorCallback::readDataAvailable(), folly::BlockingWriteServer::readDataAvailable(), folly::ReadCallbackBase::readEOF(), folly::BlockingWriteServer::readEOF(), folly::AlpnServer::readEOF(), folly::SNIServer::readEOF(), folly::ReadCallbackBase::readErr(), folly::RenegotiatingServer::RenegotiatingServer(), folly::SSLAcceptCloseRunner::run(), setSocket(), folly::WriteCallbackBase::setSocket(), folly::ReadCallbackBase::setSocket(), folly::HandshakeCallback::setSocket(), folly::SNIClient::SNIClient(), folly::SNIServer::SNIServer(), folly::SSLHandshakeClient::SSLHandshakeClient(), folly::SSLHandshakeClientDoVerify::SSLHandshakeClientDoVerify(), folly::SSLHandshakeClientNoVerify::SSLHandshakeClientNoVerify(), folly::SSLHandshakeServer::SSLHandshakeServer(), folly::SSLHandshakeServerDoVerify::SSLHandshakeServerDoVerify(), folly::SSLHandshakeServerNoVerify::SSLHandshakeServerNoVerify(), folly::SSLHandshakeServerParseClientHello::SSLHandshakeServerParseClientHello(), folly::WriteCallbackBase::writeErr(), folly::BlockingWriteClient::writeSuccess(), folly::AlpnClient::writeSuccess(), folly::SNIClient::writeSuccess(), folly::ExpectWriteErrorCallback::~ExpectWriteErrorCallback(), and folly::RenegotiatingServer::~RenegotiatingServer().


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