proxygen
folly::SendMsgFlagsCallback Class Reference

#include <AsyncSSLSocketTest.h>

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

Public Member Functions

 SendMsgFlagsCallback ()
 
void resetFlags (int flags)
 
int getFlagsImpl (folly::WriteFlags flags, int) noexceptoverride
 
- Public Member Functions inherited from folly::SendMsgParamsCallbackBase
 SendMsgParamsCallbackBase ()
 
void setSocket (const std::shared_ptr< AsyncSSLSocket > &socket)
 
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

int flags_ {0}
 
- Public Attributes inherited from folly::SendMsgParamsCallbackBase
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 79 of file AsyncSSLSocketTest.h.

Constructor & Destructor Documentation

folly::SendMsgFlagsCallback::SendMsgFlagsCallback ( )
inline

Definition at line 81 of file AsyncSSLSocketTest.h.

81 {}

Member Function Documentation

int folly::SendMsgFlagsCallback::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::SendMsgParamsCallbackBase.

Definition at line 87 of file AsyncSSLSocketTest.h.

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

89  {
90  if (flags_) {
91  return flags_;
92  } else {
93  return oldCallback_->getFlags(flags, false /*zeroCopyEnabled*/);
94  }
95  }
flags
Definition: http_parser.h:127
folly::AsyncSocket::SendMsgParamsCallback * oldCallback_
int getFlags(folly::WriteFlags flags, bool zeroCopyEnabled) noexcept
Definition: AsyncSocket.h:156
void folly::SendMsgFlagsCallback::resetFlags ( int  flags)
inline

Definition at line 83 of file AsyncSSLSocketTest.h.

Referenced by folly::TEST().

83  {
84  flags_ = flags;
85  }
flags
Definition: http_parser.h:127

Member Data Documentation

int folly::SendMsgFlagsCallback::flags_ {0}

Definition at line 97 of file AsyncSSLSocketTest.h.


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