Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations sizbut on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

TcpClient and OnReceive() Problem

Status
Not open for further replies.

jkrishnaworks

Programmer
Oct 2, 2004
2
US
Dear Experts,

I am a newbie in the Delphi Socket Programming. Currently I use Delphi 7 to create an interface to a remote server for sending and receiving information. I used 'NetChat' demo program as a model.

In the form, I created a TcpClient object and set the 'remotehost' and 'remoteport' with appropropriate values. I'm currently able to send any text messages to the server (which is not a Delphi server program) without any issues. The remote server is able to parse the sent message and process it. Then, the remote server sends the response/acknowledgement back to the client (which is my program) in the socket connection.

For some reason, OnReceive() method of the TcpClient object does not get triggered for the incoming response from the server.

Has anyone seen this problem and have a solution?

Please let me know what I'm doing wrong.

Thanks much, JK
 
I haven't worked with these objects yet, but I believe you'll need to have a TCP Server object on your form and use that, because your program, when receiving will be acting as a server.

[bobafett] BobbaFet [bobafett]

Everyone has a right to my opinion.
E-mail me at caswegkamp@hotmail.com
Great Delphi Websites faq102-5352
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top