VB5: winsock problem 
Author Message
 VB5: winsock problem

When I connect two pc's using a winsock control it works fine, but if I
disconnect and reconnect without restarting the program I get an error and
the winsock status changes to "open" (winsock.state=1). WHY?
Please help!




Tue, 30 Apr 2002 03:00:00 GMT  
 VB5: winsock problem
Before you try to reconnect put in this line

If Winsock1.State <> sckClosed Then Winsock1.Close

It should remove the problem, if not explain it.

=================
David Ashton
http://dndweb.cjb.net
=================


Quote:
> When I connect two pc's using a winsock control it works fine, but if I
> disconnect and reconnect without restarting the program I get an error and
> the winsock status changes to "open" (winsock.state=1). WHY?
> Please help!





Tue, 30 Apr 2002 03:00:00 GMT  
 VB5: winsock problem
Nope. But I've already figured it out.
Winsock sets the local port. I forgot to reset it to 0 before reconnecting.




Quote:
> Before you try to reconnect put in this line

> If Winsock1.State <> sckClosed Then Winsock1.Close

> It should remove the problem, if not explain it.

> =================
> David Ashton
> http://dndweb.cjb.net
> =================



> > When I connect two pc's using a winsock control it works fine, but if I
> > disconnect and reconnect without restarting the program I get an error
and
> > the winsock status changes to "open" (winsock.state=1). WHY?
> > Please help!





Wed, 01 May 2002 03:00:00 GMT  
 
 [ 4 post ] 

 Relevant Pages 

1. VB5: winsock problem

2. VB5 Winsock problem

3. VB5 Winsock Problem (Address in use"

4. Problem Closing a Winsock Control in VB5?

5. Winsock binary problem in VB5

6. HELP: VB5 Winsock Control Problems

7. VB5 and Winsock Error event problems

8. Problem using the Winsock Control to receive data in VB5

9. Problem with VB5 winsock control

10. VB5 WinSock Control Problem w/ TCP

11. Problem using the Winsock Control to receive data in VB5

12. Problem using the Winsock Control to receive data in VB5

 

 
Powered by phpBB® Forum Software