Hello Balbaro,
1) connect the client
2) in Client.SessionConnected event : send the string
3) In Client.Datasent event : client.closedelayed
No. This will not garantie that the data is arrived by the server. You
can make a protocol for it, so that the server send back ACK after it
has handled the data. Then close the connection. You can also call
Shutdown(1). This will send a close request to the other end. The close
request will arrive after the data of course, then the other end can
close it.
1) In server.DataAvailable event : server : ClientServer.sendstring
response;
2) In Server : ClientServer.Datasent event :
server.clientserver.closedelayed
You only have to close 1 side of the connection. The other side will
close also. Again OnDataSent is not at arrival time, it is fired when
TWSocket has given all data to winsock. As said you can use Shutdown(1)
but only at one end, that is the end that sends the last time and does
not expect a responce anymore.
Also a proto is easy to implement. If you have ascii data you can make
the proto in ascii as whell using LineEnd. But I dont know your
application of course.
---
Rgds, Wilfried [TeamICS]
http://www.overbyte.be/eng/overbyte/teamics.html
http://www.mestdagh.biz
--
To unsubscribe or change your settings for TWSocket mailing list
please goto http://www.elists.org/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be