Skip to content

Commit

Permalink
send unreliable messages in p2p connections
Browse files Browse the repository at this point in the history
  • Loading branch information
velzie committed Aug 5, 2024
1 parent 7fe674e commit 7e7f4f3
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion source/qcommon/net.c
Original file line number Diff line number Diff line change
Expand Up @@ -425,7 +425,8 @@ static int NET_UDP_GetPacket( const socket_t *socket, netadr_t *address, msg_t *
static bool NET_SDR_SendPacket( const socket_t *socket, const void *data, size_t length, const netadr_t *address ) {
struct send_message_req_s *req = (struct send_message_req_s*)malloc(sizeof(struct send_message_req_s) + length);
req->cmd = RPC_P2P_SEND_MESSAGE;
req->messageReliability = 8; // reliable tcp

req->messageReliability = 0|4|1; // 0 = unreliable, 4 = no nagle, 1 = no delay
req->count = length;
req->handle = socket->handle;
memcpy(req->buffer, data, length);
Expand Down

0 comments on commit 7e7f4f3

Please sign in to comment.