rafaelrgl
asked on
Problem with send information to server( tidtcpserver - tidtcpclient )
My question is, how the server know which client is sending a message? and how to make shure the message was receive?
1) I have application server using tidtcpserver (indy 9)
2) 15 clients connected to the server.
3) client number 14 send some message using: tidtcpclient.writeln('test ');
at same time other client send another message, how to the server knows which message is from client 14???
1) I have application server using tidtcpserver (indy 9)
2) 15 clients connected to the server.
3) client number 14 send some message using: tidtcpclient.writeln('test
at same time other client send another message, how to the server knows which message is from client 14???
ASKER
what happening to know if the server receive all messeges from the client?
if the client send this:
idtpclient.writeln('first message');
idtpclient.writeln('second message');
idtpclient.writeln('third message');
how to make shure that three message was received?
if the client send this:
idtpclient.writeln('first message');
idtpclient.writeln('second
idtpclient.writeln('third message');
how to make shure that three message was received?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
for a reliable tcp connection you will have to implement a keepalive / watchdog mechanism. This is because it's quite possible the connection drops and one of both sides doesn't notice this!
ASKER
If 2 clients send a message at same time using : writeln('ldkfs');, than what happening to know which message is from?
you are not following me: EVERY connection is in DIFFERENT thread. nothing is overlapping. at all time you know exactly which client sent a message.
that onexecute event, even if appears one time it is being executed for every thread in the context of that thread.
I don't know how to explain this better :) maybe give a clear example of what you dont know what and how works.
or better yet try it on examples to see yourself how things work. dunno what to say...
that onexecute event, even if appears one time it is being executed for every thread in the context of that thread.
I don't know how to explain this better :) maybe give a clear example of what you dont know what and how works.
or better yet try it on examples to see yourself how things work. dunno what to say...
procedure serverexecute(athread:tidp
begin
log(athread.connection.rea
athread.connection.writeln
end;
will log test from client 14 and send "boo" to the client 14.