Added support for PING command. The ping times are calculated
[silc.git] / apps / silc / client.h
index 0089dcd0616ac0b9dca18825dd4b95b4c0628c3d..8c9c4f2dcbe66e8c893423b1242aa75d9da23b30 100644 (file)
 #ifndef CLIENT_H
 #define CLIENT_H
 
+/* Structure to hold ping time information. Every PING command will 
+   add entry of this structure and is removed after reply to the ping
+   as been received. */
+typedef struct SilcClientPingStruct {
+  time_t start_time;
+  void *dest_id;
+  char *dest_name;
+} SilcClientPing;
+
 /* Window structure used in client to associate all the important
    connection (window) specific data to this structure. How the window
    actually appears on the screen in handeled by the silc_screen*
@@ -87,6 +96,10 @@ typedef struct {
      referencing (sock->user_data). */
   SilcSocketConnection sock;
 
+  /* Requested pings. */
+  SilcClientPing *ping;
+  unsigned int ping_count;
+
   /* The actual physical screen. This data is handled by the
      screen handling routines. */
   void *screen;