Fandom

lwIP Wiki

Netconn receive timeout

91pages on
this wiki
Add New Page
Talk0 Share

Not available in v1.3.2 and earlier.

netconn_set_recvtimeoutEdit

void netconn_set_recvtimeout ( struct netconn * aNetConn, int aTimeout );

Set a timeout value in ms for netconn_recv ()

  • in aNetconn : previously allocated netconn struct (e.g. netconn_new)
  • in aTimeout : time in ms

This is just a macro expanding to ( ( aNetConn )->recv_timeout = ( aTimeout ) ). For this macro to have any effect, you must (in lwIPops.h)

#define LWIP_SO_RCVTIMEO                  1              // default is 0

Note that just activating LWIP_SO_RCVTIMEO does not automatically provide a timeout. The time is set to 0 by default. You have to use netconn_set_recvtimeout.


netconn_get_recvtimeout

int netconn_get_recvtimeout ( struct netconn * aNetConn );

Get the timeout value in ms associated to a netconn structure.

  • in aNetconn : previously allocated netconn struct (e.g. netconn_new)
  • return : timeout value in ms

This too is just a macro expanding to ( ( aNetConn )->recv_timeout ) and the above mentioned define must also be activated.


Hint

To set a timeout in v1.3.2 or earlier you have to access the timeout parameter in the struct netconn manually.

conn->recv_timeout = 10000; // for 10s


(last changed: 24.05.2011)

Ad blocker interference detected!


Wikia is a free-to-use site that makes money from advertising. We have a modified experience for viewers using ad blockers

Wikia is not accessible if you’ve made further modifications. Remove the custom ad blocker rule(s) and the page will load as expected.