|
| | BasicDatagramSocket () noexcept |
| | Default constructor.
|
| |
| | BasicDatagramSocket (int ttl) noexcept |
| | Create instance specifying the time to live.
|
| |
| | BasicDatagramSocket (Mode mode, int ttl=60) noexcept |
| | Create instance specifying the mode.
|
| |
| | BasicDatagramSocket (const BasicDatagramSocket &other)=delete |
| | Copy constructor.
|
| |
| BasicDatagramSocket & | operator= (const BasicDatagramSocket &other)=delete |
| | Copy assignment operator.
|
| |
| | BasicDatagramSocket (BasicDatagramSocket &&other) noexcept |
| | Move constructor.
|
| |
| BasicDatagramSocket & | operator= (BasicDatagramSocket &&other) noexcept |
| | Move assignment operator.
|
| |
| | ~BasicDatagramSocket ()=default |
| | Destroy the instance.
|
| |
| int | open (const Protocol &protocol=Protocol()) noexcept override |
| | open socket using the given protocol.
|
| |
| int | connect (const Endpoint &endpoint) noexcept |
| | assign the default remote endpoint for this socket.
|
| |
| int | disconnect () noexcept |
| | remove the default remote endpoint.
|
| |
| void | close () noexcept override |
| | close the socket handle.
|
| |
| ssize_t | readFrom (char *data, size_t maxSize, Endpoint *endpoint=nullptr) noexcept |
| | read data on the socket.
|
| |
| ssize_t | writeTo (const char *data, size_t maxSize, const Endpoint &endpoint) noexcept |
| | write data on the socket.
|
| |
| const Endpoint & | remoteEndpoint () const noexcept |
| | determine the remote endpoint associated with this socket.
|
| |
| bool | connected () const noexcept |
| | check if the socket is connected.
|
| |
| int | mtu () const noexcept |
| | get socket mtu.
|
| |
| int | ttl () const noexcept |
| | returns the Time-To-Live value.
|
| |
| | 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.
|
| |
| 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::BasicDatagramSocket< Protocol >
basic datagram socket class.