Topic: Recv timeout on socket for MQX is returning SOCKET_ERROR(-308),

Hi

I have a simple app that does https connection on kinetis platform.
App is built using wolfSSL embedded SSL library 3.0.
The socket supplied to ssl context has recv timeout option set to value 30 seconds
and App does a wolfSSL_read() in a while loop .
non blocking io flag is set to 1.

As timeout option is set, I expect wolfSSL_read() to return WOLFSSL_CBIO_ERR_WANT_READ if no data arrives on socket for 30 seconds
However observe that read returns after 30 seconds but error is set to SOCKET_ERROR(-308).

Could you please let us know if there is anyway to do read with timeout on tcp connection.

Share

Re: Recv timeout on socket for MQX is returning SOCKET_ERROR(-308),

Could you add a print statement to the EmbedReceive() function in file io.c, right after the RECV_FUNCTION() command to print out the value "recvd" and "errno"? (I'm pretty sure it should go into line 243.) It should be working like you expect. Knowing those values would help. Thanks!