Re: synchronization control between the socket sender and socket r



Thank you veru much Herbert!

Your suggestion is to use bi-direction communication between the client and
the server. Right?
The server side need to be clear that data from which file should be sent.

Formerly what i mean is the server just sending data blindly.

Actuakky i only have one question. What i mean in the rest part is:
At the receiver side, it receives data and then wait for the consumer to use.
Before the consumer use the data, the receiver even do not call recv() to
receive the socket data.
In this way, we can enure that data will not be lost, but faster consumers
will be blocked by the slowest consumer.

Victor

"herbert422@xxxxxxxxx" wrote:

A potential solution for the issue of sender sending faster than
receiver receiving is to use an acknowledgement scheme. Example in
pseudo-code:

Client Application:

while(notFinishedSending){
msg = CreateMessage("Can I send 10 packets over?")
Send(msg)
Receive(response)
if(response == yes){ Send(10 packets of data) }
else{ wait(1 second)}
}

obviously this solution requires a bit more coding invovled, the second
question I am unable to understand it, can you please rephrase?

Vic wrote:
I have several files from the server side, and they need to be sent to the
client side in parallel. (Working on PC, VC6 suing ws2_32.lib)
After the client received the data, different consumers use the data in
parallel.
We plan to use socket (TCP) to transform the data through one single port,
and the server side send the data from different files one by one.
For example, we have file 1, 2, 3, then the server send socket of data from
the files in sequence, like: 1, 2, 3, 1, 2, 3, 1, 2, 3.....
Sender's speed is faster than receiver's speed. Some files maybe consumed
faster than other files.
The problem is how to control the synchronization between the sender and
receiver?
If we do not control the synchronization, when more data arrive then can be
consumed, data will be lost.

If at the receiver side, do not request the socket of data until it is used,
or we have enough space to save the data,
then the socket will be blocked by the slowest consumer.

Could you please tell me the best way to solve this problem? Your helpful
suggestions are highly appreciated!

Thanks!

Victor


.



Relevant Pages

  • Re: Return receipt for Win2003 server Fax
    ... > I have just setup Windows 2003 on the network. ... > installed on both the server and the client. ... > to say the receiver ...
    (microsoft.public.win2000.fax)
  • Re: UDP packets loss
    ... I am running a client/server test app over IPOIB in which the client sends ... server prints the bandwidth and how much data it received. ... Maybe the kernel is not designed to handle packets ... There clearly is an upper bound on the packet rate any given receiver can handle, ...
    (Linux-Kernel)
  • Re: UDP packets loss
    ... Subject: UDP packets loss ... I am running a client/server test app over IPOIB in which the client sends ... server prints the bandwidth and how much data it received. ... One thing to not - the CPU is 100% busy at the receiver. ...
    (Linux-Kernel)
  • Re: UDP packets loss
    ... I am running a client/server test app over IPOIB in which the client sends ... server prints the bandwidth and how much data it received. ... transmittion, I see that it actually received all the data that the client ... One thing to not - the CPU is 100% busy at the receiver. ...
    (Linux-Kernel)
  • passwd on Solaris and iPlanet LDAP single master with replicas
    ... We have a single master LDAP server ... Replication works. ... According to the system administration guide the consumer server does ... The client must follow the referral ...
    (comp.unix.solaris)