My application connects to a server machine. After sending and receiving
some protocol messages, it starts receiving messages that are inserted in a
database.
The original VB6 application, is capable to detect that the server is
disconnected and tries to connect again. Also, there is a button to
reconnect.
When I try to do the same in VB.NET, as I don't have the Winsock events, I
don't know if the connection is down (I should send something to get an
error and suppose that the connection is down), and worst, I get an error
when trying to reconnect again with the server. I don't know if the problem
is that the server still is VB6 and is any imcompatibility.
PS, I'm from Spain
--
Regards,
Diego F.
>> I tried the close method, assign to null and connecting again, but I get
>> an
[quoted text clipped - 49 lines]
> P.S.
> (Are you italian?)
Sheikko - 29 May 2007 14:25 GMT
> My application connects to a server machine. After sending and receiving
> some protocol messages, it starts receiving messages that are inserted in a
[quoted text clipped - 75 lines]
> > P.S.
> > (Are you italian?)
You can try also to use Dispose() method to releases the unmanaged
resources used by the Socket, and optionally disposes of the managed
resources.
If It don't work then the problem is in the server machine. Because
when you make Mysocket = null, than you have destroyed the socket and
when you create it in a second time you can use it. I think the
problem is on the server side, than it is not capable to detect if the
client is connected or not.
I think you can use a ping command in the server side.
Let me know. Ok