PDA

Click to See Complete Forum and Search --> : Winsock questions...


WheatChex
Feb 2nd, 2000, 10:03 PM
I am using VB6 to handle TCP communications between a PC and a scrolling marque display. I've got it basically working. I just need to clean-up a few things.

I need the socket to be "connected" (not "open") before i can send any data. My problem occurs when I close (winsock1.close) the socket and try to reconnect to it. Winsock1.State is 1 (open). If I used the close method, why is the socket still "open". After about a minute (when the connection times out) I can connect without any problem. It look to me like the close method is not working the way I think it should<G>.

I don't have any VB books, just Help files. Any insight would be great. Please send responses to swilczek@cyberlogictech.com

Thanks

Feb 3rd, 2000, 08:35 PM
I have this a lot to, a way to get around it is by useing a control array.



load winsock(1)
winsock(1).connect MyIP, MyPort
'--DO STUFF--
winsock(1).close
unload winsock(1)


After the unload, you can just load it again, and it will connect without any problems.


Hope it helps.


------------------

Vincent van den Braken
EMail: azzmodan@azzmodan.demon.nl
ICQ: 15440110 (http://www.icq.com/15440110)
Homepage: http://www.azzmodan.demon.nl