[#SSL_CTX_alpn_select_cb_func]
= SSL&lowbar;CTX&lowbar;alpn&lowbar;select&lowbar;cb&lowbar;func
:mrdocs:

Server callback that selects an ALPN protocol from the client&apos;s offer&period;

== Synopsis

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

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

== Return Value

SSL&lowbar;TLSEXT&lowbar;ERR&lowbar;OK to accept, SSL&lowbar;TLSEXT&lowbar;ERR&lowbar;NOACK to skip ALPN, or SSL&lowbar;TLSEXT&lowbar;ERR&lowbar;ALERT&lowbar;FATAL to abort&period;

== Parameters

[cols="1,4"]
|===
| Name| Description
| *ssl*
| SSL connection negotiating ALPN&period;
| *out*
| On success, set to the selected protocol (may point into `in)&period;`
| *outlen*
| Receives the length of the selected protocol&period;
| *in*
| Client&hyphen;offered protocols in wire list format&period;
| *inlen*
| Length of `in` in bytes&period;
| *arg*
| User argument registered with SSL&lowbar;CTX&lowbar;set&lowbar;alpn&lowbar;select&lowbar;cb&period;
|===


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