Skip to content
This repository has been archived by the owner on Apr 17, 2021. It is now read-only.

Handle synchronous return of socket.ReceiveFromAsync() #7

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

mfalkvidd
Copy link
Contributor

If data is already pending when socket.ReceiveFromAsync() is called,
the return value will be set to false. When this happens, the
System.Net.Sockets.SocketAsyncEventArgs.Completed event will not be
triggered, so we must call it ourselves.

If we fail to call the Completed event ourselves, the DTLS server
will stop responding to any incoming data, indefinitely.

If data is already pending when socket.ReceiveFromAsync() is called,
the return value will be set to false. When this happens, the
System.Net.Sockets.SocketAsyncEventArgs.Completed event will not be
triggered, so we must call it ourselves.

If we fail to call the Completed event ourselves, the DTLS server
will stop responding to any incoming data, indefinitely.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant