Topic: C# wrapper -- non-blockling


I am working on building a DTLS client with C#.
It happens that if the server is not running, my client will block at connect() --...--> amtRecv = con.Receive(msg, msg.Length, 0);, which is reasonable in blocking IO. However, when I tried to turn to non-blocking IO, I cannot find wolfSSL_set_using_nonblock in the C# wrapper. I looked up and found the example of IOcallback: … llbacks.cs.
However, I am not really understand how should I use it for setting non-blocking socket. Is this right solution? And is there any example?
After all, it will be great if there is same approach for wrapper to set non-blocking IO.



Re: C# wrapper -- non-blockling

Hi s123unny,

It looks like `wolfSSL_dtls_set_using_nonblock` is missing in the C# wrapper and it is not designed for blocking mode only.I've put it on the C# wrapper feature request list.

It looks like the: … SL.cs#L416

But if you are eager to work on it yourself you can find a C example for it here: … blocking.c

David Garske, wolfSSL