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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

reconnecting to socket

Status
Not open for further replies.

shaminda

Programmer
Jun 9, 2000
170
US
I use a socket class to read data from a TCP/IP Camera. The problem I have is I want to connect and close the socket multiple times. Here are the commands to connect and close the socket

_socket.Connect("172.20.83.30", 5001)

_socket.close()

The problem I have is after I close the socket I cannot open it again. Does anybody know how to re-connect? _Socket.Connect will not reconnect.

Another consideration I have is after I closed the socket setting _socket to nothing.

_socket = nothing

But how would I reinitiate the object and connect it.

Here is the code where I initiate it.

Private WithEvents _socket As New ShadowMud.Sockets.AsyncSocket
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top