]> git.rm.cloudns.org Git - xonotic/darkplaces.git/commitdiff
netconn: Rename NetConn_SendUnreliableMessage to NetConn_Transmit
authorCloudwalk <cloudwalk009@gmail.com>
Mon, 21 Sep 2020 12:25:42 +0000 (08:25 -0400)
committerCloudwalk <cloudwalk009@gmail.com>
Mon, 21 Sep 2020 12:25:42 +0000 (08:25 -0400)
cl_input.c
cl_main.c
cl_parse.c
netconn.c
netconn.h
sv_main.c

index 49fd61d031416b57295220f9b60bf0e2f066ec1a..ebde4ed76d674483157846c6a92fa3da48c95517 100644 (file)
@@ -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)
        {
index b7f26af02e1e126d8869ad12b70f1527d3ad2bb4..de1d5319b6af3bf207f127d18386c06e066949a8 100644 (file)
--- 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");
index a78b67f61921e0c429836e0d195d99784abaec54..70467a997aa5bef1965c5aa627b05bd35fdf3ea4 100644 (file)
@@ -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;
index f3c64322e42a5a527aa6383e1b59438ca0214d1e..f406012df2416908abbb71258a1aae597901d009 100755 (executable)
--- 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);
        }
 }
 
index 1198db553ed23eed6b528af7e72787ee6afb5c0b..ceba2e3e311bb312de3ecdbfb3ed49a312561cd1 100755 (executable)
--- 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);
index 1e380e1ba0ff560b76800a6f8cfc27de47e5bc72..789b7dd058436636a0d15ce9553d6dac0330335c 100644 (file)
--- 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)
 }