I don't know how to make sure there won't be any other machines in between, I mean to make sure both data belongs to the same computer.

My question is,
How can I set both messages comes in the same time like one whole message or combine them by the server as one message?
Is there any ways of doing this?

You know that both messages are from same client because it is the same TWSocketClient instance which make it available to you. This is why I told you to store that information into your own class derived from TWSocketClient. This is shown in OverbyteIcsTcpSrv1.pas source in the demos. The derived class is named TTcpSrvClient and has only two members (This is just a demo which is kept as simple as possible).

In that sample, see for example how ConnectTime member is handled and do the same with all your informations.

In order for TWSocketServer to use YOUR class, you must initialize his ClientClass property. Again, see the sample code.

The Client argument in TWSocketServer event are refering to the instance of YOUR class handling a particular and unique connection. The Sender argument in YOUR class events are always (as usual with Delphi) the instance of YOUR class handling a particular and unique connection.

Iy your sever has N connected clients, then you have N instances of YOUR class existing. Each one is accessible thru Client or Sender argument and also from TWSocketServer.Client[] indexed property.

--
francois.pie...@overbyte.be
The author of the freeware multi-tier middleware MidWare
The author of the freeware Internet Component Suite (ICS)
http://www.overbyte.be

--
To unsubscribe or change your settings for TWSocket mailing list
please goto http://lists.elists.org/cgi-bin/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be

Reply via email to