Recent

Author Topic: TTCPBlockSocket  (Read 1479 times)

michoux

  • New Member
  • *
  • Posts: 49
TTCPBlockSocket
« on: June 18, 2021, 08:47:09 am »
Hello,

I am using BlockSocket to connect to some server application - 3rd party ...

 connection:=TTCPBlockSocket.Create;
 connection.CreateSocket;                     
 connection.Connect(edit2.Text,edit3.Text);

When ever there is a new connection to server, server will send some "start" data.
In my case if I close the connection with connection.CloseSocket; and then re-connect with above sequence, server will not send start data, it looks like it thinks "old" connection was re-established.
How can I clean the "old" connection and reconnect?

For instance if I make more connections to server without closing connection before, server will always send me "start" data for every new connection, but this will create to much connections ....

Regards Michox

     

engkin

  • Hero Member
  • *****
  • Posts: 2861
Re: TTCPBlockSocket
« Reply #1 on: June 18, 2021, 02:18:08 pm »
What OS?
Did you check the status?
How quickly do you reconnect?
Probably a small project showing the problem helps in troubleshooting. But I would expect the OS to keep the connection for some time before shutting it down.

 

TinyPortal © 2005-2018