Apache Mesos
|
#include <poll_socket.hpp>
Public Member Functions | |
PollSocketImpl (int_fd s) | |
~PollSocketImpl () override | |
Try< Nothing > | listen (int backlog) override |
Future< std::shared_ptr< SocketImpl > > | accept () override |
Returns an implementation corresponding to the next pending connection for the listening socket. More... | |
Future< Nothing > | connect (const Address &address) override |
Future< size_t > | recv (char *data, size_t size) override |
Future< size_t > | send (const char *data, size_t size) override |
Future< size_t > | sendfile (int_fd fd, off_t offset, size_t size) override |
Kind | kind () const override |
Public Member Functions inherited from process::network::internal::SocketImpl | |
virtual | ~SocketImpl () |
int_fd | get () const |
Returns the file descriptor wrapped by this implementation. More... | |
Try< Address > | address () const |
Returns the Address with the assigned ip and assigned port. More... | |
Try< Address > | peer () const |
Returns the peer's Address for the accepted or connected socket. More... | |
Try< Address > | bind (const Address &address) |
Assigns the specified address to the socket. More... | |
virtual Future< std::string > | recv (const Option< ssize_t > &size=None()) |
An overload of recv , which receives data based on the specified 'size' parameter. More... | |
virtual Future< Nothing > | send (const std::string &data) |
An overload of send , which sends all of the specified data. More... | |
virtual Try< Nothing, SocketError > | shutdown (int how) |
Shuts down the socket. More... | |
Static Public Member Functions | |
static Try< std::shared_ptr< SocketImpl > > | create (int_fd s) |
Static Public Member Functions inherited from process::network::internal::SocketImpl | |
static Kind | DEFAULT_KIND () |
Returns the default Kind of implementation. More... | |
static Try< std::shared_ptr< SocketImpl > > | create (int_fd s, Kind kind=DEFAULT_KIND()) |
Returns an instance of a SocketImpl using the specified kind of implementation. More... | |
static Try< std::shared_ptr< SocketImpl > > | create (Address::Family family, Kind kind=DEFAULT_KIND()) |
Returns an instance of a SocketImpl using the specified kind of implementation. More... | |
Additional Inherited Members | |
Public Types inherited from process::network::internal::SocketImpl | |
enum | Kind { Kind::POLL } |
Available kinds of implementations. More... | |
Protected Member Functions inherited from process::network::internal::SocketImpl | |
SocketImpl (int_fd _s) | |
int_fd | release () |
Releases ownership of the file descriptor. More... | |
Static Protected Member Functions inherited from process::network::internal::SocketImpl | |
template<typename T > | |
static std::shared_ptr< T > | shared (T *t) |
Returns a std::shared_ptr<T> from this implementation. More... | |
Protected Attributes inherited from process::network::internal::SocketImpl | |
int_fd | s |
|
inline |
|
inlineoverride |
|
overridevirtual |
Returns an implementation corresponding to the next pending connection for the listening socket.
All implementations will set the NONBLOCK and CLOEXEC options on the returned socket.
TODO(josephw): MESOS-5729: Consider making the CLOEXEC option configurable by the caller of the interface.
Implements process::network::internal::SocketImpl.
Reimplemented in process::network::internal::OpenSSLSocketImpl.
|
overridevirtual |
Implements process::network::internal::SocketImpl.
Reimplemented in process::network::internal::OpenSSLSocketImpl.
|
static |
|
inlineoverridevirtual |
Implements process::network::internal::SocketImpl.
Reimplemented in process::network::internal::OpenSSLSocketImpl.
Implements process::network::internal::SocketImpl.
|
overridevirtual |
Implements process::network::internal::SocketImpl.
Reimplemented in process::network::internal::OpenSSLSocketImpl.
|
overridevirtual |
Implements process::network::internal::SocketImpl.
Reimplemented in process::network::internal::OpenSSLSocketImpl.
|
overridevirtual |
Implements process::network::internal::SocketImpl.
Reimplemented in process::network::internal::OpenSSLSocketImpl.