proxygen
folly::AsyncSocket::IoHandler Class Reference

#include <AsyncSocket.h>

Inheritance diagram for folly::AsyncSocket::IoHandler:
folly::EventHandler

Public Member Functions

 IoHandler (AsyncSocket *socket, EventBase *eventBase)
 
 IoHandler (AsyncSocket *socket, EventBase *eventBase, int fd)
 
void handlerReady (uint16_t events) noexceptoverride
 
- Public Member Functions inherited from folly::EventHandler
 EventHandler (EventBase *eventBase, int fd)
 
 EventHandler (EventBase *eventBase=nullptr, NetworkSocket fd=NetworkSocket())
 
virtual ~EventHandler ()
 
bool registerHandler (uint16_t events)
 
void unregisterHandler ()
 
bool isHandlerRegistered () const
 
void attachEventBase (EventBase *eventBase)
 
void detachEventBase ()
 
void changeHandlerFD (int fd)
 
void changeHandlerFD (NetworkSocket fd)
 
void initHandler (EventBase *eventBase, int fd)
 
void initHandler (EventBase *eventBase, NetworkSocket fd)
 
uint16_t getRegisteredEvents () const
 
bool registerInternalHandler (uint16_t events)
 
bool isPending () const
 

Private Attributes

AsyncSocketsocket_
 

Additional Inherited Members

- Public Types inherited from folly::EventHandler
enum  EventFlags {
  NONE = 0, READ = EV_READ, WRITE = EV_WRITE, READ_WRITE = (READ | WRITE),
  PERSIST = EV_PERSIST
}
 

Detailed Description

Definition at line 998 of file AsyncSocket.h.

Constructor & Destructor Documentation

folly::AsyncSocket::IoHandler::IoHandler ( AsyncSocket socket,
EventBase eventBase 
)
inline

Definition at line 1000 of file AsyncSocket.h.

1001  : EventHandler(eventBase, -1), socket_(socket) {}
NetworkSocket socket(int af, int type, int protocol)
Definition: NetOps.cpp:412
EventHandler(EventBase *eventBase, int fd)
Definition: EventHandler.h:65
folly::AsyncSocket::IoHandler::IoHandler ( AsyncSocket socket,
EventBase eventBase,
int  fd 
)
inline

Definition at line 1002 of file AsyncSocket.h.

1003  : EventHandler(eventBase, fd), socket_(socket) {}
NetworkSocket socket(int af, int type, int protocol)
Definition: NetOps.cpp:412
EventHandler(EventBase *eventBase, int fd)
Definition: EventHandler.h:65

Member Function Documentation

void folly::AsyncSocket::IoHandler::handlerReady ( uint16_t  events)
inlineoverridevirtualnoexcept

handlerReady() is invoked when the handler is ready.

Parameters
eventsA bitset indicating the events that are ready.

Implements folly::EventHandler.

Definition at line 1005 of file AsyncSocket.h.

References socket_.

1005  {
1006  socket_->ioReady(events);
1007  }
void ioReady(uint16_t events) noexcept

Member Data Documentation

AsyncSocket* folly::AsyncSocket::IoHandler::socket_
private

Definition at line 1010 of file AsyncSocket.h.


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