Small problem with messages sent via Internet - Programmers Heaven

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories

Small problem with messages sent via Internet

Well, if somebody still remembers, I am making a modified version of [b]SimpleTCP 2[/b]. I have now added new Component, serverClient which is used on server instead of TSimpleTCPClientm. But this is not the problem.

Problem is this: When [b]2 messages are sent at the same time[/b] or atleast nearly the same time, there will be a problem. (Client sends message to server and server to client) When these messages are sent, both the client and server, will 'broke'.
When message is received, they will see whether they can sent a confirmation. But if message was just sent, no confirmation can be sent before one is received. Here is a simple version of normal message sending:
Server==>Message==>Client
Server<==Confirmation+Client's message<==Client
Server==>Confirmation+Server's message==>Client
Server<==Confirmation<==Client

Now both are in [b]'ready'[/b] status. But see this:

Server==>Message==>Client
Server<==Client's message<==Client

Server is waiting for confirmation, just like the Client. [b]How do I solve this problem?[/b] I could make a timer to see whether no data have been sent lately and send one extra Confirmation but it would be just a route around this.
Sign In or Register to comment.