When sending something back to a client having sent a command, you use the sender argument of the dataavailable event. This sender represent the client:
  TWSocket(Sender).Send(MyBufAddr, MyBufLnegth);

I still can't find anything regarding this in existed demos/samples.

In the server sample, this is handled in TTcpDaemon.ProcessData which is called from TTcpDaemon.ClientDataAvailable which passes "sender as TTcpSrvClient" to ProcessData as its client argument. TTcpSrvClient inhérit from TWSocket.

Please run OverbyteIcsSrvTcp under the debugger. Place a breakpoint on the first line of TTcpDaemon.ClientDataAvailable. Then use OverbyteIcsClient7 sample to connect to the server and send something. Your breakpoint will be reached. From there, single step to understand what happend (Do not singlestep in TWSocket or TWSocketServer for now, it would be to complex at this stage).

--
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