folly::netops::Dispatcher

Dispatcher for netops:: calls.

Synopsis

Declared in <folly/net/NetOpsDispatcher.h>

class Dispatcher;

Description

Using a Dispatcher instead of calling netops:: directly enables tests to mock netops:: calls.

Member Functions

NameDescription
accept [virtual]Accepts a connection on a listening socket.
bind [virtual]Binds a socket to a local address.
close [virtual]Closes a socket.
connect [virtual]Connects a socket to a remote address.
getpeername [virtual]Retrieves the address of the connected peer.
getsockname [virtual]Retrieves the local address bound to a socket.
getsockopt [virtual]Retrieves a socket option.
inet_aton [virtual]Converts an IPv4 dotted-decimal string to a network address.
listen [virtual]Marks a socket as accepting connections.
poll [virtual]Waits for events on a set of poll descriptors.
recv [virtual]Receives data from a connected socket.
recvfrom [virtual]Receives data and records the source address.
recvmmsg [virtual]Receives multiple messages in a single call.
recvmsg [virtual]Receives a message, including ancillary data.
send [virtual]Sends data on a connected socket.
sendmmsg [virtual]Sends multiple messages in a single call.
sendmsg [virtual]Sends a message, including ancillary data.
sendto [virtual]Sends data to a specific destination address.
set_socket_blocking [virtual]Puts a socket into blocking mode.
set_socket_close_on_exec [virtual]Sets the close-on-exec flag on a socket.
set_socket_non_blocking [virtual]Puts a socket into non-blocking mode.
setsockopt [virtual]Sets a socket option.
shutdown [virtual]Shuts down part or all of a full-duplex connection.
socket [virtual]Creates a socket.
socketpair [virtual]Creates a connected pair of sockets.

Static Member Functions

NameDescription
getDefaultInstance Returns the default Dispatcher instance.

Protected Member Functions

NameDescription
Dispatcher [constructor]Default-constructs a Dispatcher.
~Dispatcher [destructor] [virtual]Destroys the Dispatcher.