proxygen
|
#include <AsyncUDPSocket.h>
Public Member Functions | |
virtual void | getReadBuffer (void **buf, size_t *len) noexcept=0 |
virtual void | onDataAvailable (const folly::SocketAddress &client, size_t len, bool truncated) noexcept=0 |
virtual void | onReadError (const AsyncSocketException &ex) noexcept=0 |
virtual void | onReadClosed () noexcept=0 |
virtual | ~ReadCallback ()=default |
Definition at line 40 of file AsyncUDPSocket.h.
|
virtualdefault |
|
pure virtualnoexcept |
Invoked when the socket becomes readable and we want buffer to write to.
NOTE: From socket we will end up reading at most len
bytes and if there were more bytes in datagram, we will end up dropping them.
Implemented in folly::AsyncUDPServerSocket.
Referenced by folly::AsyncUDPSocket::handleRead().
|
pure virtualnoexcept |
Invoked when a new datagraom is available on the socket. len
is the number of bytes read and truncated
is true if we had to drop few bytes because of running out of buffer space.
Implemented in folly::AsyncUDPServerSocket.
Referenced by folly::AsyncUDPSocket::handleRead().
|
pure virtualnoexcept |
Invoked when socket is closed and a read callback is registered.
Implemented in folly::AsyncUDPServerSocket.
Referenced by folly::AsyncUDPSocket::close().
|
pure virtualnoexcept |
Invoked when there is an error reading from the socket.
NOTE: Since UDP is connectionless, you can still read from the socket. But you have to re-register readCallback yourself after onReadError.
Implemented in folly::AsyncUDPServerSocket.
Referenced by folly::AsyncUDPSocket::handleRead(), and folly::AsyncUDPSocket::resumeRead().