TIP: Click on subject to list as thread! ANSI
echo: c_plusplus
to: OZBEN EVREN
from: DANIEL LYNES
date: 1998-03-01 19:23:00
subject: C++ Builder/Internet Components

 -=> 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)

SOURCE: echomail via exec-pc

Email questions or comments to sysop@ipingthereforeiam.com
All parts of this website painstakingly hand-crafted in the U.S.A.!
IPTIA BBS/MUD/Terminal/Game Server List, © 2025 IPTIA Consulting™.