|
AsyncBerkeley
Asynchronous Berkeley sockets. Simple.
|
A generic wrapper for socket options. More...
#include <io/socket/socket_option.hpp>
Public Types | |
| using | value_type = std::decay_t< T > |
| The type of the socket option value. | |
| using | size_type = std::size_t |
| The size type for the socket option. | |
Public Member Functions | |
| template<size_type Size = sizeof(value_type)> requires (Size <= sizeof(value_type)) | |
| constexpr | socket_option (size_type size=Size) noexcept |
| Constructs a socket_option with a given size. | |
| socket_option (const socket_option &)=default | |
| Default copy constructor. | |
| socket_option (socket_option &&)=default | |
| Default move constructor. | |
| socket_option (const value_type &val) noexcept | |
| Constructs a socket_option from a value. | |
| template<size_type Size> requires (Size <= sizeof(value_type) || Size == std::dynamic_extent) | |
| socket_option (std::span< const std::byte, Size > option) noexcept | |
| Constructs a socket_option from a span of bytes. | |
| template<size_type Size> requires (Size <= sizeof(value_type) || Size == std::dynamic_extent) | |
| socket_option (std::span< std::byte, Size > option) noexcept | |
| Constructs a socket_option from a span of bytes. | |
| auto | operator= (const socket_option &) -> socket_option &=default |
| Default copy assignment operator. | |
| auto | operator= (socket_option &&) -> socket_option &=default |
| Default move assignment operator. | |
| ~socket_option ()=default | |
| Default destructor. | |
| constexpr auto | operator* () noexcept -> value_type & |
| Dereferences the socket option to its value. | |
| constexpr auto | operator-> () noexcept -> value_type * |
| Accesses the socket option's value. | |
| constexpr auto | begin () noexcept -> std::byte * |
| Gets an iterator to the beginning of the option's byte representation. | |
| constexpr auto | begin () const noexcept -> const std::byte * |
| Gets a const iterator to the beginning of the option's byte representation. | |
| constexpr auto | end () noexcept -> std::byte * |
| Gets an iterator to the end of the option's byte representation. | |
| constexpr auto | end () const noexcept -> const std::byte * |
| Gets a const iterator to the end of the option's byte representation. | |
| auto | operator<=> (const socket_option &other) const noexcept -> bool |
| Compares this socket_option with another for ordering. | |
| auto | operator== (const socket_option &other) const noexcept -> bool |
| Compares two socket_option objects for equality. | |
A generic wrapper for socket options.
| T | The type of the socket option value. |
|
inlineconstexprnoexcept |
Constructs a socket_option with a given size.
| Size | The size of the option. |
| size | The size of the option in bytes. |
|
inlinenoexcept |
Constructs a socket_option from a value.
| val | The value of the socket option. |
|
inlinenoexcept |
Constructs a socket_option from a span of bytes.
| Size | The size of the span. |
| option | The span of bytes representing the option. |
|
inlinenoexcept |
Constructs a socket_option from a span of bytes.
| Size | The size of the span. |
| option | The span of bytes representing the option. |
|
inlineconstexprnoexcept |
Gets a const iterator to the beginning of the option's byte representation.
|
inlineconstexprnoexcept |
Gets an iterator to the beginning of the option's byte representation.
|
inlineconstexprnoexcept |
Gets a const iterator to the end of the option's byte representation.
|
inlineconstexprnoexcept |
Gets an iterator to the end of the option's byte representation.
|
inlineconstexprnoexcept |
Dereferences the socket option to its value.
|
inlineconstexprnoexcept |
Accesses the socket option's value.
|
inlinenoexcept |
Compares this socket_option with another for ordering.
| other | The other socket_option to compare with. |
|
default |
Default copy assignment operator.
|
default |
Default move assignment operator.
|
inlinenoexcept |
Compares two socket_option objects for equality.
| other | The other socket_option to compare against. |