proxygen
|
#include <NetworkSocket.h>
Public Types | |
using | native_handle_type = int |
Public Member Functions | |
constexpr | NetworkSocket () |
constexpr | NetworkSocket (native_handle_type d) |
int | toFd () const |
Static Public Member Functions | |
static NetworkSocket | fromFd (int fd) |
Public Attributes | |
native_handle_type | data |
Static Public Attributes | |
static constexpr native_handle_type | invalid_handle_value = -1 |
Friends | |
constexpr bool | operator== (const NetworkSocket &a, const NetworkSocket &b) noexcept |
constexpr bool | operator!= (const NetworkSocket &a, const NetworkSocket &b) noexcept |
This is just a very thin wrapper around either a file descriptor or a SOCKET depending on platform, along with a couple of helper methods for explicitly converting to/from file descriptors, even on Windows.
Definition at line 30 of file NetworkSocket.h.
using folly::NetworkSocket::native_handle_type = int |
Definition at line 35 of file NetworkSocket.h.
|
inline |
Definition at line 41 of file NetworkSocket.h.
Referenced by fromFd().
|
inlineexplicit |
Definition at line 42 of file NetworkSocket.h.
|
inlinestatic |
Definition at line 44 of file NetworkSocket.h.
References folly::netops::detail::SocketFileDescriptorMap::fdToSocket(), and NetworkSocket().
Referenced by folly::EventHandler::changeHandlerFD(), folly::EventHandler::initHandler(), folly::AsyncUDPSocket::setFD(), and folly::shutdownNoInt().
|
inline |
Definition at line 49 of file NetworkSocket.h.
References folly::netops::detail::SocketFileDescriptorMap::socketToFd().
Referenced by folly::EventHandler::changeHandlerFD(), folly::EventHandler::EventHandler(), folly::AsyncUDPSocket::getFD(), and folly::EventHandler::initHandler().
|
friend |
Definition at line 59 of file NetworkSocket.h.
|
friend |
Definition at line 53 of file NetworkSocket.h.
native_handle_type folly::NetworkSocket::data |
Definition at line 39 of file NetworkSocket.h.
Referenced by folly::netops::close(), folly::operator<<(), folly::netops::recv(), folly::netops::recvfrom(), folly::netops::recvmsg(), folly::netops::sendmsg(), folly::netops::set_socket_close_on_exec(), and folly::netops::set_socket_non_blocking().
|
static |
Definition at line 36 of file NetworkSocket.h.