Add support for UserStats message.
[umurmur.git] / src / client.h
index a7d43f0bbb42d108de343ad1d9535aebc572f7e1..d2f935c2511c52dac9d0eca17b20dc34f80e400c 100644 (file)
@@ -31,7 +31,6 @@
 #ifndef CLIENT_H_45786678
 #define CLIENT_H_45786678
 
-#include <openssl/ssl.h>
 #include <stdint.h>
 #include <unistd.h>             /* close() */
 #include <sys/types.h>
@@ -47,6 +46,7 @@
 #include "crypt.h"
 #include "timer.h"
 #include "pds.h"
+#include "ssl.h"
 
 #define BUFSIZE 8192
 #define UDP_BUFSIZE 512
@@ -57,7 +57,7 @@
 
 typedef struct {
        int tcpfd;
-       SSL *ssl;
+       SSL_handle_t *ssl;
        bool_t SSLready;
        bool_t shutdown_wait;
        cryptState_t cryptState;
@@ -70,13 +70,13 @@ typedef struct {
        int sessionId;
        uint64_t key;
        char *username;
-       bool_t authenticated, deaf, mute;
-       char *os, *release;
+       bool_t bUDP, authenticated, deaf, mute;
+       char *os, *release, *os_version;
        uint32_t version;
        int codec_count;
        struct dlist codecs;
        int availableBandwidth;
-       etimer_t lastActivity;
+       etimer_t lastActivity, connectTime, idleTime;
        struct dlist node;
        struct dlist txMsgQueue;
        int txQueueCount;
@@ -84,6 +84,8 @@ typedef struct {
        char *context;
        struct dlist chan_node;
        struct dlist voicetargets;
+       float UDPPingAvg, UDPPingVar, TCPPingAvg, TCPPingVar;
+       uint32_t UDPPackets, TCPPackets;
 } client_t;
 
 typedef struct {