VB5 Winsock - Error 10048 "Address in use" 
Author Message
 VB5 Winsock - Error 10048 "Address in use"

When I use the Winsock crontrol in VB5 I get the error
10048 - "Address in use" when I try to connect to a server for the
second time.
The connection IS closed (state = 0) before I use the Connect method.

I have tried to search the Microsoft site, the newsgroups and the web
for some information on this, but no luck. Can someone please help me
with what this error means and maybe how I get get rid of it.

Also...Is there a place where all these error messages for the Winsock
and FTP control is explained, not just stated as it is in the
documentation?

--



Sun, 26 Sep 1999 03:00:00 GMT  
 VB5 Winsock - Error 10048 "Address in use"

Thomas,

Quote:
>When I use the Winsock crontrol in VB5 I get the error
>10048 - "Address in use" when I try to connect to a server for the
>second time.
>The connection IS closed (state = 0) before I use the Connect method.

Yes, but is the connection _really_ closed?  No.  Socket stacks hold
on to a socket for some indeterminate amount of time after you "close"
it.  This is so for a varitey of reasons including ensuring that all
data queued for transmission is actually sent, and other more arcane
reasons I'm not prepared to go into here.  Note, that it _is_ possible
for data to arrive after either you or the peer close a socket.

Now, there are two ways to get around this problem.  The first is to
simply not use the same local address when you reconnect.  The second
option isn't supported by most socket controls.  Socket stacks provide
some options that allow you to specify how close will be handled,
these can cause a stack to release a socket right away.  The only
control I know that handles this is the one I wrote, Mabry's ASocket
(www.mabry.com for free-trial versions).

Zane

Quote:

>I have tried to search the Microsoft site, the newsgroups and the web
>for some information on this, but no luck. Can someone please help me
>with what this error means and maybe how I get get rid of it.

>Also...Is there a place where all these error messages for the Winsock
>and FTP control is explained, not just stated as it is in the
>documentation?

>--




Sun, 26 Sep 1999 03:00:00 GMT  
 VB5 Winsock - Error 10048 "Address in use"

Quote:

> When I use the Winsock crontrol in VB5 I get the error
> 10048 - "Address in use" when I try to connect to a server for the
> second time.
> The connection IS closed (state = 0) before I use the Connect method.

I got this kind of error when using a WinSocket control for VB3. The
problem was that I used allways the same LocalPort in my socket, and
most server implementations (for example Unix ECHO-Servers) dont allow
more than one incomming calls to a listenning socket from the same
machine (same IP) and using the same LocalPort (of the client).
The way I went arround consisted in using allways a different LocalPort
for the client's socket. (In my case, the control I used had the
capability of declaring a LocalPort of IPPORT_ANY, what means that you
use allways a free port numbre that has not allready been used
previously.

I know I have explained it a little bit confused. If you dont understand
e-mail me.

Alberto Almendra

http://www.etsit.upm.es/~almendra



Tue, 28 Sep 1999 03:00:00 GMT  
 
 [ 3 post ] 

 Relevant Pages 

1. Winsock error 10048 "Address in use"

2. Winsock error 10048 "Address in use"

3. VB5 Winsock - Error 10048 "Address in use"

4. VB5 Winsock - Error 10048 "Address in use"

5. VB5 Winsock - Error 10048 "Address in use"

6. VB5 Winsock - Error 10048 "Address in use"

7. Winsock OCX error - 10048 : Address in use.

8. Winsock OCX error - 10048 : Address in use.

9. Error '10048', Address In Use: Winsock Control

10. Winsock OCX error - 10048 : Address in use.

11. Error '10048', Address In Use: Winsock Control

12. Winsock Error "Address In Use"

 

 
Powered by phpBB® Forum Software