proxygen
|
#include <AsyncSocket.h>
Public Member Functions | |
virtual | ~SendMsgParamsCallback ()=default |
int | getFlags (folly::WriteFlags flags, bool zeroCopyEnabled) noexcept |
virtual void | getAncillaryData (folly::WriteFlags, void *) noexcept |
virtual uint32_t | getAncillaryDataSize (folly::WriteFlags) noexcept |
Static Public Attributes | |
static const size_t | maxAncillaryDataSize {0x5000} |
Private Member Functions | |
virtual int | getFlagsImpl (folly::WriteFlags, int defaultFlags) |
int | getDefaultFlags (folly::WriteFlags flags, bool zeroCopyEnabled) noexcept |
Definition at line 143 of file AsyncSocket.h.
|
virtualdefault |
|
inlinevirtualnoexcept |
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.
flags | Write flags requested for the given write operation |
data | Pointer to ancillary data buffer to initialize. |
Reimplemented in TestSendMsgParamsCallback, folly::SendMsgDataCallback, and folly::SendMsgParamsCallbackBase.
Definition at line 170 of file AsyncSocket.h.
Referenced by folly::SendMsgParamsCallbackBase::getAncillaryData(), folly::SendMsgDataCallback::getAncillaryData(), and folly::AsyncSocket::performWrite().
|
inlinevirtualnoexcept |
getAncillaryDataSize() will be invoked to retrieve the size of ancillary data buffer which should be passed to sendmsg() system call
flags | Write flags requested for the given write operation |
Reimplemented in TestSendMsgParamsCallback, folly::SendMsgDataCallback, and folly::SendMsgParamsCallbackBase.
Definition at line 180 of file AsyncSocket.h.
Referenced by folly::SendMsgParamsCallbackBase::getAncillaryDataSize(), folly::SendMsgDataCallback::getAncillaryDataSize(), and folly::AsyncSocket::performWrite().
|
privatenoexcept |
getDefaultFlags() will be invoked by getFlags(folly::WriteFlags flags) to retrieve the default set of flags, and pass them to getFlagsImpl(...)
flags | Write flags requested for the given write operation |
Definition at line 225 of file AsyncSocket.cpp.
References folly::CORK, folly::EOR, folly::isSet(), MSG_ZEROCOPY, folly::netops::setsockopt(), and folly::WRITE_MSG_ZEROCOPY.
|
inlinenoexcept |
getFlags() will be invoked to retrieve the desired flags to be passed to sendmsg() system call. This method was intentionally declared non-virtual, so there is no way to override it. Instead feel free to override getFlagsImpl(flags, defaultFlags) method instead, and enjoy the convenience of defaultFlags passed there.
flags | Write flags requested for the given write operation |
Definition at line 156 of file AsyncSocket.h.
Referenced by folly::SendMsgParamsCallbackBase::getFlagsImpl(), folly::SendMsgFlagsCallback::getFlagsImpl(), and folly::AsyncSocket::performWrite().
|
inlineprivatevirtual |
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.
flags | Write flags requested for the given write operation |
defaultflags | A set of message flags returned by getDefaultFlags() method for the given "flags" mask. |
Reimplemented in TestSendMsgParamsCallback, folly::SendMsgFlagsCallback, and folly::SendMsgParamsCallbackBase.
Definition at line 201 of file AsyncSocket.h.
References folly::AsyncSocket::AsyncSocket(), folly::pushmi::__adl::noexcept(), folly::AsyncSocket::setShutdownSocketSet(), string, uint16_t, and uint32_t.
|
static |
Definition at line 185 of file AsyncSocket.h.
Referenced by folly::AsyncSSLSocket::bioWrite(), and folly::AsyncSocket::performWrite().