|
-
May 18th, 1999, 10:54 AM
#1
How to measure the time between the client and server buffers??
Hi,
i did a client and server programm, and i want to measure the time between the client buffer when i send the socket and the server buffer when i just receive the socket from the client without counting the time for reading or writing the the date file from or to the disk(buffer).
-
May 18th, 1999, 11:00 AM
#2
Re: How to measure the time between the client and server buffers??
you can send the time_t into the formatting of the buffer
the client will send : "915148800 - My Text"
The server will receive the text, an extract the client time from the text
it will get then the system time with the function time () and do a diff the time that is in the buffer
-
May 18th, 1999, 01:24 PM
#3
Re: How to measure the time between the client and server buffers??
Hi,
I dont understand what you say, could you explain it clearly with some c code, please
Thanks
-
May 19th, 1999, 03:18 AM
#4
Re: How to measure the time between the client and server buffers??
Client :
sprintf (MyBuf, "%ld - This is a client message", time (NULL));
=>Send MyBut to the Server
Server:
=>Read on the Socket a Buffer like "915148800 - This is a client message"
=>You have to get the number in a variable which represent the time when the client sent the message
=>Then you just have to the difference between the actual time and the client time
-
May 19th, 1999, 08:45 AM
#5
Re: How to measure the time between the client and server buffers??
Hi,
but the internal clock in the two computers are different, so how can you do to synchronise them.
Thks ( you can write in french)
-
May 19th, 1999, 09:52 AM
#6
Re: How to measure the time between the client and server buffers??
Quand ton client se connecte au serveur, il note l'heure de connection.
Le serveur lui envoie tout de suite son heure.
Tu fais la difference des deux et tu sais quel est le delta que doit ajouter ou retirer * l'heure du client
pour te synchroniser au serveur
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|