Contents

sock_gettype

Declaration

errno_t sock_gettype(socket_t so, int *domain, int *type, int *protocol);

Parameters

  • so:

    The socket to check.

  • domain:

    The domain of the socket (PF_INET, ...). May be NULL.

  • type:

    The socket type (SOCK_STREAM, SOCK_DGRAM, ...). May be NULL.

  • protocol:

    The socket protocol. May be NULL.

Return Value

0 on success otherwise the errno error.

Discussion

Retrieves information about the socket. This is the same information that was used to create the socket. If any of the parameters following so are NULL, that information is not retrieved.

See Also

Network Kernel Extensions