BIO_get_port

Parse a service name or numeric port string (deprecated; prefer modern address APIs).

Synopsis

Declared in <openssl/bio.h>

[[deprecated]]
int
BIO_get_port(
    char const* str,
    unsigned short* port_ptr);

WARNING

Deprecated. Use of this entity is allowed but discouraged.

Return Value

1 on success, or 0 on error.

Parameters

NameDescription
strPort string such as "443" or a service name.
port_ptrReceives the network-byte-order port number on success.