[#SSL_CTX_sess_set_new_cb]
= SSL&lowbar;CTX&lowbar;sess&lowbar;set&lowbar;new&lowbar;cb
:mrdocs:

Set the callback invoked when a new session is negotiated for caching&period;

== Synopsis

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

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
void
SSL&lowbar;CTX&lowbar;sess&lowbar;set&lowbar;new&lowbar;cb(
    xref:SSL_CTX.adoc[SSL&lowbar;CTX]* ctx,
    int(* new&lowbar;session&lowbar;cb)(xref:ssl_st.adoc[ssl&lowbar;st]*, xref:SSL_SESSION.adoc[SSL&lowbar;SESSION]*));
----

== Parameters

[cols="1,4"]
|===
| Name| Description
| *ctx*
| SSL context (typically a server) that receives new sessions&period;
| *new&lowbar;session&lowbar;cb*
| Callback receiving the SSL and session&semi; return 1 to retain a reference, or 0 to discard&period;
|===


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