Newsgroups : Borland : borland.public.delphi.internet.winsock : 2006 Jul : Address already in use

www.cryer.info
Managed Newsgroup Archive

Address already in use

Subject:Address already in use
Posted by:"Atmapuri" (janez.makovs..@usa.net)
Date:Mon, 17 Jul 2006 15:57:15

Hi!

Running this code once:

    aTcpClient.BoundPortMax := 12000;
    aTcpClient.BoundPortMin := 8000;
    aTcpClient.BoundPort := IdBoundPortDefault;
    aTcpClient.BoundIP := ClientIP;

    aTcpClient.Host := ServerIP;
    aTcpClient.Port := MyServersPort;

   aTcpClient.Connect;
   aTcpClient.Disconnect;

Executes OK, but running the second time gives: ":Address already in use
error" and I have to wait 5 minutes before it will run again..

Why?

Is there a way around this? How can I disconnect to free the address?
I have also put a breakpoint insides the servers OnDisconnect and the event
triggers fine.

Thanks!
Atmapuri

Replies:

www.cryer.info
Managed Newsgroup Archive