|
| | BasicRawSocket () noexcept |
| | default constructor.
|
| |
| | BasicRawSocket (Mode mode) noexcept |
| | create socket instance specifying the mode.
|
| |
| | BasicRawSocket (const BasicRawSocket &other)=delete |
| | copy constructor.
|
| |
| BasicRawSocket & | operator= (const BasicRawSocket &other)=delete |
| | copy assignment operator.
|
| |
| | BasicRawSocket (BasicRawSocket &&other) noexcept=default |
| | move constructor.
|
| |
| BasicRawSocket & | operator= (BasicRawSocket &&other) noexcept=default |
| | move assignment operator.
|
| |
| virtual | ~BasicRawSocket ()=default |
| | destroy the socket instance.
|
| |
| int | bind (const Endpoint &endpoint) noexcept override |
| | assigns the specified endpoint to the socket.
|
| |
| int | bindToDevice (const std::string &device) noexcept |
| | assigns the specified device to the socket.
|
| |
| ssize_t | canRead () const noexcept |
| | get the number of readable bytes.
|
| |
| ssize_t | read (char *data, size_t maxSize) noexcept |
| | read data.
|
| |
| ssize_t | write (const char *data, size_t maxSize) noexcept |
| | write data.
|
| |
| virtual int | setOption (Option option, int value) noexcept |
| | set the given option to the given value.
|
| |
| | BasicSocket () noexcept |
| | default constructor.
|
| |
| | BasicSocket (Mode mode) noexcept |
| | create socket instance specifying the mode.
|
| |
| | BasicSocket (const BasicSocket &other)=delete |
| | copy constructor.
|
| |
| BasicSocket & | operator= (const BasicSocket &other)=delete |
| | copy assignment operator.
|
| |
| | BasicSocket (BasicSocket &&other) noexcept |
| | move constructor.
|
| |
| BasicSocket & | operator= (BasicSocket &&other) noexcept |
| | move assignment operator.
|
| |
| virtual | ~BasicSocket () |
| | destroy the socket instance.
|
| |
| virtual int | open (const Protocol &protocol=Protocol()) noexcept |
| | open socket using the given protocol.
|
| |
| virtual void | close () noexcept |
| | close the socket.
|
| |
| bool | waitReadyRead () const noexcept |
| | block until new data is available for reading.
|
| |
| bool | waitReadyRead (std::chrono::nanoseconds timeout) const noexcept |
| | block until new data is available for reading, giving up after the given duration.
|
| |
| bool | waitReadyRead (TimePoint deadline) const noexcept |
| | block until new data is available for reading, giving up at the given time point.
|
| |
| bool | waitReadyWrite () const noexcept |
| | block until at least one byte can be written.
|
| |
| bool | waitReadyWrite (std::chrono::nanoseconds timeout) const noexcept |
| | block until at least one byte can be written, giving up after the given duration.
|
| |
| bool | waitReadyWrite (TimePoint deadline) const noexcept |
| | block until at least one byte can be written, giving up at the given time point.
|
| |
| void | setMode (Mode mode) noexcept |
| | set the socket to the non-blocking or blocking mode.
|
| |
| Endpoint | localEndpoint () const noexcept |
| | determine the local endpoint associated with this socket.
|
| |
| bool | opened () const noexcept |
| | check if the socket is opened.
|
| |
| int | family () const noexcept |
| | get socket address family.
|
| |
| int | type () const noexcept |
| | get the protocol communication semantic.
|
| |
| int | protocol () const noexcept |
| | get socket protocol.
|
| |
| Mode | mode () const noexcept |
| | get the blocking mode of the socket.
|
| |
| int | handle () const noexcept |
| | get socket native handle.
|
| |
| int | wait (bool wantRead, bool wantWrite) const noexcept |
| | wait for the socket handle to become ready.
|
| |
| int | waitFor (bool wantRead, bool wantWrite, std::chrono::nanoseconds timeout) const noexcept |
| | wait for the socket handle to become ready, giving up after the given duration.
|
| |
| int | waitUntil (bool wantRead, bool wantWrite, TimePoint deadline) const noexcept |
| | wait for the socket handle to become ready, giving up at the given time point.
|
| |
template<class Protocol>
class join::BasicRawSocket< Protocol >
basic raw socket class.