mirror of
https://github.com/RIOT-OS/RIOT.git
synced 2024-12-29 04:50:03 +01:00
posix_sockets: provide function to check if file descriptor is a socket
This commit is contained in:
parent
c7dc0bb8de
commit
791069acf1
@ -1066,6 +1066,11 @@ int setsockopt(int socket, int level, int option_name, const void *option_value,
|
||||
#endif
|
||||
}
|
||||
|
||||
bool posix_socket_is(int fd)
|
||||
{
|
||||
return IS_USED(MODULE_SOCK_ASYNC) && (_get_socket(fd) != NULL);
|
||||
}
|
||||
|
||||
/**
|
||||
* @}
|
||||
*/
|
||||
|
Loading…
Reference in New Issue
Block a user