[#SSL_CTX_npn_select_cb_func]
= SSL&lowbar;CTX&lowbar;npn&lowbar;select&lowbar;cb&lowbar;func
:mrdocs:

NPN client callback that selects a protocol from the server&apos;s list&period;

== Synopsis

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

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
typedef int(* SSL&lowbar;CTX&lowbar;npn&lowbar;select&lowbar;cb&lowbar;func)(xref:SSL.adoc[SSL]*, unsigned char**, unsigned char*, unsigned char const*, unsigned int, void*);
----

== Return Value

SSL&lowbar;TLSEXT&lowbar;ERR&lowbar;OK on success&semi; other values abort the connection&period;

== Parameters

[cols="1,4"]
|===
| Name| Description
| *s*
| SSL connection performing NPN&period;
| *out*
| On success, set to the selected protocol (may point into `in)&period;`
| *outlen*
| Receives the length of the selected protocol name&period;
| *in*
| Server&hyphen;advertised protocols in wire list format&period;
| *inlen*
| Length of `in` in bytes&period;
| *arg*
| User argument registered with SSL&lowbar;CTX&lowbar;set&lowbar;next&lowbar;proto&lowbar;select&lowbar;cb&period;
|===


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