What I need is when I disconnect on client it will disconnect on client and server then right after for it to listen on server..know what I mean ?
Printable View
What I need is when I disconnect on client it will disconnect on client and server then right after for it to listen on server..know what I mean ?
yea i know what you mean, heres the server Winsock_Close event:
VB Code:
'Basically this event fires when the client disconnects Private Sub Winsock1_Close() Winsock1.Close 'Return to closed state Winsock1.Listen 'Listen for another connection End Sub
I would put the code in the Winsock_Error event also, so if the socket errors for any reason, it will close and listen for a new connection.
in your client Winsock_Close and Error events you should have something like this...
VB Code:
Winsock.Close Label1.Caption = "Disconnected"
ohya thats I wasn't thinkin of Winsock_Close sub XD thanks very much