// 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)
{
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");
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;
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];
}
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;
}
{
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;
}
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;
}
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);
}
}
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);
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);
}
}
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)
}