]> git.stg.codes - stg.git/blobdiff - projects/stargazer/plugins/other/smux/smux.h
Added SMUX reconnect. Fixes #18.
[stg.git] / projects / stargazer / plugins / other / smux / smux.h
index cc722511515edeec72c50737866459021b395146..ef7b191c1843589e38a6acee7ce2398695b6febd 100644 (file)
@@ -138,6 +138,7 @@ private:
     static void * Runner(void * d);
     void Run();
     bool PrepareNet();
+    bool Reconnect();
 
     bool DispatchPDUs(const SMUX_PDUs_t * pdus);
 
@@ -168,6 +169,10 @@ private:
     pthread_mutex_t mutex;
     bool running;
     bool stopped;
+    bool needReconnect;
+
+    time_t lastReconnectTry;
+    unsigned reconnectTimeout;
 
     int sock;