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
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool posix_socket_is(int fd)
|
||||||
|
{
|
||||||
|
return IS_USED(MODULE_SOCK_ASYNC) && (_get_socket(fd) != NULL);
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @}
|
* @}
|
||||||
*/
|
*/
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user