diff options
| author | Magnus Auvinen <magnus.auvinen@gmail.com> | 2008-04-05 14:50:43 +0000 |
|---|---|---|
| committer | Magnus Auvinen <magnus.auvinen@gmail.com> | 2008-04-05 14:50:43 +0000 |
| commit | 34c3a1c1426e6443ba30b8e2852b73bf92757dff (patch) | |
| tree | c804647d311bfcf2627c5a519a15888c6e396b93 /src/engine/e_system.h | |
| parent | f713ad20288800e8a74160ba390ddefb47841033 (diff) | |
| download | zcatch-34c3a1c1426e6443ba30b8e2852b73bf92757dff.tar.gz zcatch-34c3a1c1426e6443ba30b8e2852b73bf92757dff.zip | |
new network code. not perfect. connectionless packets is missing so no server discovery is possible. reduced network traffic by A LOT
Diffstat (limited to 'src/engine/e_system.h')
| -rw-r--r-- | src/engine/e_system.h | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/engine/e_system.h b/src/engine/e_system.h index 9902cb24..38c2b076 100644 --- a/src/engine/e_system.h +++ b/src/engine/e_system.h @@ -541,6 +541,7 @@ void str_sanitize_strong(char *str); void str_sanitize(char *str); int str_comp_nocase(const char *a, const char *b); const char *str_find_nocase(const char *haystack, const char *needle); +void str_hex(char *dst, int dst_size, const void *data, int data_size); typedef void (*DBG_LOGGER)(const char *line); void dbg_logger(DBG_LOGGER logger); @@ -552,6 +553,16 @@ IOHANDLE io_stdin(); IOHANDLE io_stdout(); IOHANDLE io_stderr(); +typedef struct +{ + int sent_packets; + int sent_bytes; + int recv_packets; + int recv_bytes; +} NETSTATS; + +void net_stats(NETSTATS *stats); + #ifdef __cplusplus } #endif |