Hi,
I need to port the mbedtls stack on the platform which does not support the classic thread-based os or even interrupts (WiFi module with old fashion contiki-os in prebuilded SDK…). I’m confused about mbedtls_set_bio callbacks responsible for receiving data. I cannot use the the timeout-based calback because the way the operating system switches processes doesn’t allow me to create an ordinary function that simply waits for incoming data without blocking whole system…
I’m not sure how the non-blocking callback actually works… In my imagination the best way of non-blocking solution is that the mbedtls library will provide a function like dataReceived(…) which will be called by my custom process when socket receives data, not by the mbedtls itself…
So my question is how to properly use the non blocking mbedtls_recv_callback? Or is it some hack’y solution for that ?