lwip_selscan() function
Go through the readset and writeset lists and see which socket of the sockets set in the sets has events. On return, readset, writeset and exceptset have the sockets enabled that had events.
Arguments
maxfdp1
the highest socket index in the sets
readset_in
set of sockets to check for read events
writeset_in
set of sockets to check for write events
exceptset_in
set of sockets to check for error events
readset_out
set of sockets that had read events
writeset_out
set of sockets that had write events
exceptset_out
set os sockets that had error events
Return value
number of sockets that had events (read/write/exception) (>= 0)