1
0
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:
Martine S. Lenders 2019-12-13 12:56:22 +01:00 committed by Martine S. Lenders
parent c7dc0bb8de
commit 791069acf1
No known key found for this signature in database
GPG Key ID: CCD317364F63286F

View File

@ -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);
}
/**
* @}
*/