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 biv343 on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Indy TCP Server Disconnect Problem

Status
Not open for further replies.

harveyDent

Programmer
Oct 9, 2008
1
TR
Hi everyone, this is my first post, and I am kinda excited about this

I am trying to write a very simple server-client application using Indy (it's the one that comes default with Borland Delphi 7). It's based on a sample project called Screen Thief (can be found in )

It simply works like this, server and client talk to each other continuously (using ReadLn and WriteLn functions)(They say '0', meaning I want nothing from you right now). If server wants something from client, says something other than '0'. This is the basic working mechanism. Everything seems fine, there are no synchronisation problems, or timeout problems.

Here is the scenario: A client connects, say Hello to server, server says Hi, they stand a while, the client goes offline, and server sees client is gone, updates the client list, life goes on. But, after client connects to server, they greet each other, and server WANTS something (and its done by client without any problem), then client goes offline -> the servers TCPServerDisconnect function starts to work but hangs in the line Clients.LockList.Remove(Client);

I am sure that I am missing something stupid, but nothing exceptional happens. Just the same talking between server-client. What may be causing this problem?

Thanks :)
 
I can't see where TIdTCPServer or TIdContext has a Clients or LockList property. Can you post some code?
 
I am having the same problem, I get a Thread timeout error when I try to shutdown the server, even though client has disconnected. Please post if you have found any add'l info....thanks.
 
I have tested this and it works, but I am using Indy 10

/Daddy

-----------------------------------------------------
What You See Is What You Get
Never underestimate tha powah of tha google!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top