G
Greg
Hi,
I'm having an issue with the UdpClient class. I use it to receive
asynchronously some data but if no data is received for a delay
(typically some minutes), no data can be received after that (even
though they appear in Wireshark on the good endpoint).
My code is pretty simple :
----
while (true)
{
ar = BeginReceive(callback);
ar.AsyncWaitHandle.WaitOne();
data = EndReceive();
Console.WriteLine(data);
}
void callback()
{
// Nothing to do here, we use the AsyncResult returned by
BeginReceive()
}
----
When I call EndReceive() in the callback, the same behaviour happens.
Does anybody have a clue ? I must be doing something wrong...
Regards,
I'm having an issue with the UdpClient class. I use it to receive
asynchronously some data but if no data is received for a delay
(typically some minutes), no data can be received after that (even
though they appear in Wireshark on the good endpoint).
My code is pretty simple :
----
while (true)
{
ar = BeginReceive(callback);
ar.AsyncWaitHandle.WaitOne();
data = EndReceive();
Console.WriteLine(data);
}
void callback()
{
// Nothing to do here, we use the AsyncResult returned by
BeginReceive()
}
----
When I call EndReceive() in the callback, the same behaviour happens.
Does anybody have a clue ? I must be doing something wrong...
Regards,