[#BIO_get_port]
= BIO&lowbar;get&lowbar;port
:mrdocs:

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

== Synopsis

Declared in `&lt;openssl&sol;bio&period;h&gt;`

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
&lsqb;&lsqb;deprecated&rsqb;&rsqb;
int
BIO&lowbar;get&lowbar;port(
    char const* str,
    unsigned short* port&lowbar;ptr);
----

[WARNING]
====
https://en.cppreference.com/cpp/language/attributes/deprecated[Deprecated^]. Use of this entity is allowed but discouraged.
====
== Return Value

1 on success, or 0 on error&period;

== Parameters

[cols="1,4"]
|===
| Name| Description
| *str*
| Port string such as &quot;443&quot; or a service name&period;
| *port&lowbar;ptr*
| Receives the network&hyphen;byte&hyphen;order port number on success&period;
|===


[.small]#Created with https://www.mrdocs.com[MrDocs]#
