Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

winsock control in VB 1

Status
Not open for further replies.

stevebassett

Programmer
Mar 27, 2003
10
0
0
US
Hi,
I am a VC user primarily and have used winsock for basic stuff very often. In VC, the socket.send and sendto had return codes that indicated that there was an error in sending. However, the senddata method in VB does not seem to have similar mechanism in place. Is there any way to detect errors?
Thanks,
Steve
 
hi,
of course you can detect the errors.
you have a property called state, you can use it like :
if winsock.state=0 then
msgbox "connection is closed"
end if.

diffent codes are
0-close
1-open
2-listening
3-connection pending
4-resolving host
5-Host-resolved
6-connecting
7-connected
8-closing
9-other error

hope it works!!!!
in case of further queries abhay.tomar@honeywell.com
Regards
abhay
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top