A
Alain Dekker
Hi,
I've created a socket like this:
ipAddress = ipAddress.Parse(strAddress)
ipRemoteEP = New IPEndPoint(ipAddress, nPort)
m_Socket = New Socket(AddressFamily.InterNetwork, SocketType.Stream,
ProtocolType.Tcp)
m_Socket.BeginConnect(ipRemoteEP, AddressOf ConnectCallback, m_Socket)
and that all works fine (ie. the ConnectCallBack function is called when the
connection is made). However, I've hit a snag: How do I get signalled when
the remote server disconnects (crashes/shuts down/closes the
connection/etc)?
Thanks,
Alain
I've created a socket like this:
ipAddress = ipAddress.Parse(strAddress)
ipRemoteEP = New IPEndPoint(ipAddress, nPort)
m_Socket = New Socket(AddressFamily.InterNetwork, SocketType.Stream,
ProtocolType.Tcp)
m_Socket.BeginConnect(ipRemoteEP, AddressOf ConnectCallback, m_Socket)
and that all works fine (ie. the ConnectCallBack function is called when the
connection is made). However, I've hit a snag: How do I get signalled when
the remote server disconnects (crashes/shuts down/closes the
connection/etc)?
Thanks,
Alain