From: Cloudwalk Date: Mon, 21 Sep 2020 12:25:42 +0000 (-0400) Subject: netconn: Rename NetConn_SendUnreliableMessage to NetConn_Transmit X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=990b038c1e59e173b230550a5fc419e3c5212664;p=xonotic%2Fdarkplaces.git netconn: Rename NetConn_SendUnreliableMessage to NetConn_Transmit --- diff --git a/cl_input.c b/cl_input.c index 49fd61d0..ebde4ed7 100644 --- a/cl_input.c +++ b/cl_input.c @@ -2114,7 +2114,7 @@ void CL_SendMove(void) // send the reliable message (forwarded commands) if there is one if (buf.cursize || cls.netcon->message.cursize) - NetConn_SendUnreliableMessage(cls.netcon, &buf, cls.protocol, max(20*(buf.cursize+40), cl_rate.integer), cl_rate_burstsize.integer, false); + NetConn_Transmit(cls.netcon, &buf, cls.protocol, max(20*(buf.cursize+40), cl_rate.integer), cl_rate_burstsize.integer, false); if (quemove) { diff --git a/cl_main.c b/cl_main.c index b7f26af0..de1d5319 100644 --- a/cl_main.c +++ b/cl_main.c @@ -405,9 +405,9 @@ void CL_Disconnect(void) Con_DPrint("Sending clc_disconnect\n"); MSG_WriteByte(&buf, clc_disconnect); } - NetConn_SendUnreliableMessage(cls.netcon, &buf, cls.protocol, 10000, 0, false); - NetConn_SendUnreliableMessage(cls.netcon, &buf, cls.protocol, 10000, 0, false); - NetConn_SendUnreliableMessage(cls.netcon, &buf, cls.protocol, 10000, 0, false); + NetConn_Transmit(cls.netcon, &buf, cls.protocol, 10000, 0, false); + NetConn_Transmit(cls.netcon, &buf, cls.protocol, 10000, 0, false); + NetConn_Transmit(cls.netcon, &buf, cls.protocol, 10000, 0, false); NetConn_Close(cls.netcon); cls.netcon = NULL; Con_Printf("Disconnected\n"); diff --git a/cl_parse.c b/cl_parse.c index a78b67f6..70467a99 100644 --- a/cl_parse.c +++ b/cl_parse.c @@ -368,7 +368,7 @@ void CL_KeepaliveMessage (qbool readmessages) msg.data = buf; msg.maxsize = sizeof(buf); MSG_WriteChar(&msg, clc_nop); - NetConn_SendUnreliableMessage(cls.netcon, &msg, cls.protocol, 10000, 0, false); + NetConn_Transmit(cls.netcon, &msg, cls.protocol, 10000, 0, false); } recursive = thisrecursive; diff --git a/netconn.c b/netconn.c index f3c64322..f406012d 100755 --- a/netconn.c +++ b/netconn.c @@ -723,7 +723,7 @@ static int NetConn_AddCryptoFlag(crypto_t *crypto) return flag; } -int NetConn_SendUnreliableMessage(netconn_t *conn, sizebuf_t *data, protocolversion_t protocol, int rate, int burstsize, qbool quakesignon_suppressreliables) +int NetConn_Transmit(netconn_t *conn, sizebuf_t *data, protocolversion_t protocol, int rate, int burstsize, qbool quakesignon_suppressreliables) { int totallen = 0; unsigned char sendbuffer[NET_HEADERSIZE+NET_MAXMESSAGE]; @@ -774,7 +774,7 @@ int NetConn_SendUnreliableMessage(netconn_t *conn, sizebuf_t *data, protocolvers } if (packetLen + (sendreliable ? conn->sendMessageLength : 0) > 1400) { - Con_Printf ("NetConn_SendUnreliableMessage: reliable message too big %u\n", data->cursize); + Con_Printf ("NetConn_Transmit: reliable message too big %u\n", data->cursize); return -1; } @@ -849,7 +849,7 @@ int NetConn_SendUnreliableMessage(netconn_t *conn, sizebuf_t *data, protocolvers { if (conn->message.cursize > (int)sizeof(conn->sendMessage)) { - Con_Printf("NetConn_SendUnreliableMessage: reliable message too big (%u > %u)\n", conn->message.cursize, (int)sizeof(conn->sendMessage)); + Con_Printf("NetConn_Transmit: reliable message too big (%u > %u)\n", conn->message.cursize, (int)sizeof(conn->sendMessage)); conn->message.overflowed = true; return -1; } @@ -903,7 +903,7 @@ int NetConn_SendUnreliableMessage(netconn_t *conn, sizebuf_t *data, protocolvers if (packetLen > (int)sizeof(sendbuffer)) { - Con_Printf("NetConn_SendUnreliableMessage: message too big %u\n", data->cursize); + Con_Printf("NetConn_Transmit: message too big %u\n", data->cursize); return -1; } @@ -1559,7 +1559,7 @@ static void NetConn_ConnectionEstablished(lhnetsocket_t *mysocket, lhnetaddress_ msg.data = buf; msg.maxsize = sizeof(buf); MSG_WriteChar(&msg, clc_nop); - NetConn_SendUnreliableMessage(cls.netcon, &msg, cls.protocol, 10000, 0, false); + NetConn_Transmit(cls.netcon, &msg, cls.protocol, 10000, 0, false); } } diff --git a/netconn.h b/netconn.h index 1198db55..ceba2e3e 100755 --- a/netconn.h +++ b/netconn.h @@ -431,7 +431,7 @@ extern cvar_t net_usesizelimit; extern cvar_t net_burstreserve; qbool NetConn_CanSend(netconn_t *conn); -int NetConn_SendUnreliableMessage(netconn_t *conn, sizebuf_t *data, protocolversion_t protocol, int rate, int burstsize, qbool quakesignon_suppressreliables); +int NetConn_Transmit(netconn_t *conn, sizebuf_t *data, protocolversion_t protocol, int rate, int burstsize, qbool quakesignon_suppressreliables); qbool NetConn_HaveClientPorts(void); qbool NetConn_HaveServerPorts(void); void NetConn_CloseClientPorts(void); diff --git a/sv_main.c b/sv_main.c index 1e380e1b..789b7dd0 100644 --- a/sv_main.c +++ b/sv_main.c @@ -1190,9 +1190,9 @@ void SV_DropClient(qbool crash) buf.data = bufdata; buf.maxsize = sizeof(bufdata); MSG_WriteByte(&buf, svc_disconnect); - NetConn_SendUnreliableMessage(host_client->netconnection, &buf, sv.protocol, 10000, 0, false); - NetConn_SendUnreliableMessage(host_client->netconnection, &buf, sv.protocol, 10000, 0, false); - NetConn_SendUnreliableMessage(host_client->netconnection, &buf, sv.protocol, 10000, 0, false); + NetConn_Transmit(host_client->netconnection, &buf, sv.protocol, 10000, 0, false); + NetConn_Transmit(host_client->netconnection, &buf, sv.protocol, 10000, 0, false); + NetConn_Transmit(host_client->netconnection, &buf, sv.protocol, 10000, 0, false); } } @@ -2620,7 +2620,7 @@ static void SV_SendClientDatagram (client_t *client) SV_WriteDemoMessage(client, &msg, false); // send the datagram - NetConn_SendUnreliableMessage (client->netconnection, &msg, sv.protocol, clientrate, client->rate_burstsize, client->sendsignon == 2); + NetConn_Transmit (client->netconnection, &msg, sv.protocol, clientrate, client->rate_burstsize, client->sendsignon == 2); if (client->sendsignon == 1 && !client->netconnection->message.cursize) client->sendsignon = 2; // prevent reliable until client sends prespawn (this is the keepalive phase) }