|
-
Oct 29th, 2005, 07:42 AM
#1
Thread Starter
Fanatic Member
Winsock states - help needed!
hi guyz,
i need somone to help xplain to me all the winsock states
i only know the sckClosed - 0, sckConnected and sckError but am suprised when i started seein some numerical value like 8
and i want to know all the winsock states we have what can you actually do with winsock when in this states.
assuming i entered the wrong server ip from the client app in design time and there's a form i've created where you can specify a new server ip in runtime.
ok now i run my app and i want to change the ip at runtime and re-connect the winsock. how can i do it
i've been trying this and it gives error each time saying "wrong protocol or connection state"
help plz
Last edited by modpluz; Oct 29th, 2005 at 12:10 PM.
-
Oct 29th, 2005, 09:53 PM
#2
New Member
Re: Winsock states - help needed!
sckClosed 0 Default. Closed
sckOpen 1 Open
sckListening 2 Listening
sckConnected 7 Connected
sckError 9 Error
this is what i found in the msdn library
-
Oct 29th, 2005, 09:57 PM
#3
New Member
Re: Winsock states - help needed!
and before you can change the ip, or connect it again, try to close it first!
listen example:
VB Code:
winsock1.close
winsock1.localport 555
winsock1.listen
connect example:
VB Code:
winsock1.close
winsock1.connect "www.microsoft.com", 80
this should do it... it just have to be closed before you can modify it's settings!
-
Oct 31st, 2005, 08:31 AM
#4
Thread Starter
Fanatic Member
Re: Winsock states - help needed!
-
Nov 1st, 2005, 09:35 PM
#5
Thread Starter
Fanatic Member
Re: Winsock states - help needed!
but this means you can't use the same port that it's using before it was closed
it brings up the message "Address is in use"
Last edited by modpluz; Nov 1st, 2005 at 09:56 PM.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|