@CHIP-RTOS C Library - TCP/IP API
select_ms
Await specified events on a selected set of sockets. int select_ms ( int nfds,
fd_set far *readfds,
fd_set far *writefds,
fd_set far *exceptfds,
long timeout ) ; Parameters
nfds
- One greater than highest socket descriptor to be
monitored in the following set of three fd_set objects.
readfds
- Input/Output Parameter: Pointer to a
fd_set bit field
that on input specifies the set of sockets to be monitored for receiver
activity. On return those sockets for which receiver data is ready
among those specified for monitoring will have their bits in this field
set to '1'. All other bits will be zeroed.
writefds
- Input/Output Parameter: Pointer to a
fd_set bit field that
on input specifies the set of sockets to be monitored for send ready
condition. On return those sockets ready for send among those
specified for monitoring here will have their bits in this field set
to '1'. All other bits will be zeroed.
exceptfds
- Input/Output Parameter: Pointer to a
fd_set bit field
that on input specifies the set of sockets to be monitored for error
conditions. On return those sockets with errors among those
specified for monitoring here will have their bits in this field
set to '1'. All other bits will be zeroed.
timeout
- Timeout in milliseconds. Set to a minus value
to block without timeout. Set to zero for polling.
Return Value
- 0 if timeout, otherwise number of hits. This is the
number of selected sockets for which a specified event has occurred.
If nfds
input parameter was invalid, then the
return value will also be zero.
Comments
- The alternative to select()
API is available when Berkeley sockets compatible source is
desired. The only difference is that this function takes
the timeout value as a simple long value in units of milliseconds.
Refer to the select()
API description for a more information about these API.
See Also
RTOS API
- This library function invokes a RTOS software interrupt.
Refer to this RTOS API function's
documentation
for more details.
Supported since or modified in @CHIP-RTOS version-
| SC12 | SC13 | SC11 | SC1x3 | SC2x |
-
| V1.22 | V1.22 | V1.22 | V1.11 | V1.00 |
Supported by @CHIP-RTOS C Library since version
This API List
List of C Libraries
@CHIP-RTOS Main Index
End of document
|