Structure to represent a network peer. More...
#include <socket.h>
Public Attributes | |
int | socket |
struct socket_request_listener | listener |
char * | incoming_buffer |
int | ping |
struct message_handler ** | handlers |
int | handler_count |
Structure to represent a network peer.
This structure contains information about a network peer, including its socket, request listener, incoming buffer, ping value, and message handlers.
peer::socket |
The socket file descriptor associated with the peer.
peer::listener |
The socket request listener associated with the peer, used to monitor read events and handle timeouts.
peer::incoming_buffer |
Pointer to a buffer used for storing incoming data from the peer.
peer::ping |
An integer value representing the ping (latency) of the peer.
peer::handlers |
Array of pointers to message handler structures, used to process incoming messages from the peer.
peer::handler_count |
The number of message handlers in the handlers array.