my_teams
p_server_send_packet.c File Reference
#include <unistd.h>
#include "protocol.h"
Include dependency graph for p_server_send_packet.c:

Functions

bool p_server_send_packet (const p_packet_t *packet, const int client_fd, p_server_t *server)
 Send a packet from the server to a specific client. More...
 
bool p_server_send_packet_type (const uint16_t type, const int client_fd, p_server_t *server)
 Send a packet from the server to a specific client. More...
 

Function Documentation

◆ p_server_send_packet()

bool p_server_send_packet ( const p_packet_t packet,
int  client_fd,
p_server_t server 
)

Send a packet from the server to a specific client.

Parameters
packetPointer to the packet to be sent.
client_fdFile descriptor of the client.
serverPointer to the server.
Returns
true on success, false on failure.
Here is the call graph for this function:

◆ p_server_send_packet_type()

bool p_server_send_packet_type ( uint16_t  type,
int  client_fd,
p_server_t server 
)

Send a packet from the server to a specific client.

Parameters
typeType of the packet.
client_fdFile descriptor of the client.
serverPointer to the server.
Returns
true on success, false on failure.
Here is the call graph for this function: