Main Page | Modules | Alphabetical List | Data Structures | File List | Data Fields | Globals | Related Pages

tsync.h File Reference


Detailed Description

Time synchronization support.

Author:
Raphael Manfredi
Date:
2004

#include <glib.h>
#include "lib/tm.h"

Go to the source code of this file.

Functions

void tsync_init (void)
 Initializes the time synchronization.

void tsync_close (void)
 Cleanup at shutdown time.

void tsync_send (struct gnutella_node *n, guint32 node_id)
 Send time synchronization request to specified node.

void tsync_send_timestamp (tm_t *orig, tm_t *final)
 Called when final "T1" timestamp was written to the request, which superseded the original timestamp we had.

void tsync_got_request (struct gnutella_node *n, tm_t *got)
 Got time request, answer it.

void tsync_got_reply (struct gnutella_node *n, tm_t *sent, tm_t *received, tm_t *replied, tm_t *got, gboolean ntp)
 Got a reply to our initial "Time Sync" request.


Function Documentation

void tsync_close void   ) 
 

Cleanup at shutdown time.

void tsync_got_reply struct gnutella_node n,
tm_t sent,
tm_t received,
tm_t replied,
tm_t got,
gboolean  ntp
 

Got a reply to our initial "Time Sync" request.

void tsync_got_request struct gnutella_node n,
tm_t got
 

Got time request, answer it.

Parameters:
n is the node from which we got the request
got is the timestamp at which we received the request

void tsync_init void   ) 
 

Initializes the time synchronization.

void tsync_send struct gnutella_node n,
guint32  node_id
 

Send time synchronization request to specified node.

When node_id is non-zero, it refers to the connected node to which we're sending the time synchronization request.

void tsync_send_timestamp tm_t orig,
tm_t final
 

Called when final "T1" timestamp was written to the request, which superseded the original timestamp we had.

Note that this routine will be called each time the message is scheduled for writing, which does not mean it will get written, especially when enqueued in a TCP message queue with lower stages flow-controlling...


Generated on Sun Feb 12 10:50:08 2006 for Gtk-Gnutella by doxygen 1.3.6