|
| UDPSocket (SOCKET_ADDRESS_FAMILY domain=AF_INET) |
|
| ~UDPSocket () override=default |
|
size_t | read (uint8_t *buffer, size_t size, sockaddr_in *from=nullptr) override |
|
size_t | read (Buffer &buffer, size_t size, sockaddr_in *from=nullptr) override |
|
size_t | read (String &buffer, size_t size, sockaddr_in *from=nullptr) override |
|
SOCKET | fd () const |
|
void | open_addr (OpenMode openMode=OpenMode::CREATE, const sockaddr_in *addr=nullptr, std::chrono::milliseconds timeout=std::chrono::milliseconds(0)) |
|
| BaseSocket (SOCKET_ADDRESS_FAMILY domain=AF_INET, int32_t type=SOCK_STREAM, int32_t protocol=0) |
|
| BaseSocket (const BaseSocket &other)=delete |
|
| BaseSocket (BaseSocket &&other) noexcept=default |
|
virtual | ~BaseSocket () |
| Destructor.
|
|
BaseSocket & | operator= (const BaseSocket &other)=delete |
|
BaseSocket & | operator= (BaseSocket &&other) noexcept=default |
|
void | blockingMode (bool blocking) |
|
virtual size_t | socketBytes () |
|
virtual void | attach (SOCKET socketHandle, bool accept) |
|
virtual SOCKET | detach () |
|
void | host (const Host &host) |
|
const Host & | host () const |
|
void | open (const Host &host=Host(), OpenMode openMode=OpenMode::CONNECT, bool blockingMode=true, std::chrono::milliseconds timeoutMS=std::chrono::milliseconds(0)) |
|
void | open (const struct sockaddr_in &address, OpenMode openMode=OpenMode::CONNECT, bool blockingMode=true, std::chrono::milliseconds timeoutMS=std::chrono::milliseconds(0)) |
|
void | bind (const char *address, uint32_t portNumber) |
|
void | listen (uint16_t portNumber=0) |
|
virtual void | close () noexcept |
|
bool | active () const |
|
int32_t | control (int flag, const uint32_t *check) const |
|
void | setOption (int level, int option, int value) const |
|
void | getOption (int level, int option, int &value) const |
|
virtual size_t | recv (uint8_t *buffer, size_t len) |
|
virtual size_t | send (const uint8_t *buffer, size_t len) |
|
virtual size_t | read (uint8_t *buffer, size_t size, sockaddr_in *from) |
|
virtual size_t | read (uint8_t *buffer, size_t size) |
|
virtual size_t | read (Buffer &buffer, size_t size, sockaddr_in *from) |
|
size_t | read (Buffer &buffer, size_t size) |
|
virtual size_t | read (String &buffer, size_t size, sockaddr_in *from) |
|
size_t | read (String &buffer, size_t size) |
|
virtual size_t | write (const uint8_t *buffer, size_t size, const sockaddr_in *peer) |
|
size_t | write (const uint8_t *buffer, size_t size) |
|
virtual size_t | write (const Buffer &buffer, const sockaddr_in *peer) |
|
size_t | write (const Buffer &buffer) |
|
virtual size_t | write (const String &buffer, const sockaddr_in *peer) |
|
size_t | write (const String &buffer) |
|
virtual bool | readyToRead (std::chrono::milliseconds timeout) |
|
virtual bool | readyToWrite (std::chrono::milliseconds timeout) |
|
bool | blockingMode () const |
| Return current blocking mode state. More...
|
|
UDP Socket
Sends and receives data using UDP protocol. Not buffered. Doesn't use CSocket timeout settings in read and write operations by default.