]> git.xonotic.org Git - xonotic/darkplaces.git/blobdiff - netconn.h
Fix name of CONFIG_VIDEO_CAPTURE macro.
[xonotic/darkplaces.git] / netconn.h
index f93d297eb6f52d78f49af8b5c9f004c65442d943..6744318e93679c23495db0f851116d4e54b22648 100755 (executable)
--- a/netconn.h
+++ b/netconn.h
@@ -128,6 +128,7 @@ typedef struct netgraphitem_s
        int reliablebytes;
        int unreliablebytes;
        int ackbytes;
+       double cleartime;
 }
 netgraphitem_t;
 
@@ -207,6 +208,7 @@ typedef struct netconn_s
 
        // bandwidth estimator
        double          cleartime;                      // if realtime > nc->cleartime, free to go
+       double          incoming_cleartime;             // if realtime > nc->cleartime, free to go (netgraph cleartime simulation only)
 
        // this tracks packet loss and packet sizes on the most recent packets
        // used by shownetgraph feature
@@ -221,6 +223,17 @@ typedef struct netconn_s
 
        char address[128];
        crypto_t crypto;
+
+       // statistic counters
+       int packetsSent;
+       int packetsReSent;
+       int packetsReceived;
+       int receivedDuplicateCount;
+       int droppedDatagrams;
+       int unreliableMessagesSent;
+       int unreliableMessagesReceived;
+       int reliableMessagesSent;
+       int reliableMessagesReceived;
 } netconn_t;
 
 extern netconn_t *netconn_list;
@@ -229,10 +242,7 @@ extern mempool_t *netconn_mempool;
 extern cvar_t hostname;
 extern cvar_t developer_networking;
 
-#define SERVERLIST_TOTALSIZE           2048
 #define SERVERLIST_VIEWLISTSIZE                SERVERLIST_TOTALSIZE
-#define SERVERLIST_ANDMASKCOUNT                5
-#define SERVERLIST_ORMASKCOUNT         5
 
 typedef enum serverlist_maskop_e
 {
@@ -392,7 +402,10 @@ extern int masterreplycount;
 extern int serverquerycount;
 extern int serverreplycount;
 
-extern sizebuf_t net_message;
+extern sizebuf_t cl_message;
+extern sizebuf_t sv_message;
+extern char cl_readstring[MAX_INPUTLINE];
+extern char sv_readstring[MAX_INPUTLINE];
 
 extern cvar_t sv_public;
 
@@ -402,9 +415,11 @@ extern cvar_t cl_netport;
 extern cvar_t sv_netport;
 extern cvar_t net_address;
 extern cvar_t net_address_ipv6;
+extern cvar_t net_usesizelimit;
+extern cvar_t net_burstreserve;
 
 qboolean NetConn_CanSend(netconn_t *conn);
-int NetConn_SendUnreliableMessage(netconn_t *conn, sizebuf_t *data, protocolversion_t protocol, int rate, qboolean quakesignon_suppressreliables);
+int NetConn_SendUnreliableMessage(netconn_t *conn, sizebuf_t *data, protocolversion_t protocol, int rate, int burstsize, qboolean quakesignon_suppressreliables);
 qboolean NetConn_HaveClientPorts(void);
 qboolean NetConn_HaveServerPorts(void);
 void NetConn_CloseClientPorts(void);