-=> Quoting Ozben Evren to All <=-
OE> C++B (TCP,HTML) but when I close the TCP socket and try to reopen it
OE> again, TCP object sends "Address in Use" and won`t connect again. Is
OE> there a way to avoid this? I tried creating TCP object at run-time
Ok, I'm not familiar with how internet socket connections are achieved using
Borland Builder, but if you can do a parallelism between it and the WinSock
toolkit, check to make sure you are doing the following:
shutdown(3) ;
closesocket() ;
I can't remember what the exact parameters are off the top of my head, but
the shutdown() function should take a parameter of 3 (if it returns failure,
retry, using a value of 1). This should be performed before closing the
socket(), as it frees up the socket; closesocket() merely frees up the
resources attached to the socket; it doesn't shutdown any connections.
... Backup not found: (A)bort (R)etry (S)lap nearest innocent bystander.
--- Blue Wave/DOS v2.30 [NR]
---------------
* Origin: The Eclectic Lab (1:153/831)
|