Asked By Rainer Queck
17-Jul-08 09:56 AM
Hello Pavel,
Hm... apparently, if you do a Send, and get the "ICMP port
unreachable" response, this manifests itself as an error on the next
Receive you try to do on the same socket. MSDN claims that a socket
is unusable once that happens, so you may have to recreate it entirely
on the same endpoint (once the client goes back online, it shouldn't
make any difference anyway, so long as the endpoint is the same).
Basically I understand what you say, but...
If I start my app and send a udp message to a port which is not opened
(yet) I do get the socket exception (10054).
The confusing part is, that in this case I can call the
udpClient.BeginReceive within the Callback Method, without causing another
SocketException.
If a connection was establische, and then the remote socke closes I can't
call BeginRecieve without causing another (10054).
Why is that?
Regards
Rainer