diff options
| author | Garrett D'Amore <garrett@damore.org> | 2017-12-31 13:31:02 -0800 |
|---|---|---|
| committer | Garrett D'Amore <garrett@damore.org> | 2017-12-31 13:31:02 -0800 |
| commit | 7df0165712bb6ca623830ac55c548696c83e8647 (patch) | |
| tree | 397de6a93a7d638331b71d1c40c9b89b21487b39 /src/supplemental/tls/tls.h | |
| parent | 772e16dd93d61d8cb9bce2d2e8b88ab42366f725 (diff) | |
| download | nng-7df0165712bb6ca623830ac55c548696c83e8647.tar.gz nng-7df0165712bb6ca623830ac55c548696c83e8647.tar.bz2 nng-7df0165712bb6ca623830ac55c548696c83e8647.zip | |
Rename config init/fini to alloc/free, add documentation for them.
Diffstat (limited to 'src/supplemental/tls/tls.h')
| -rw-r--r-- | src/supplemental/tls/tls.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/supplemental/tls/tls.h b/src/supplemental/tls/tls.h index 0c9e791f..8175854d 100644 --- a/src/supplemental/tls/tls.h +++ b/src/supplemental/tls/tls.h @@ -14,6 +14,14 @@ // nni_tls represents the context for a single TLS stream. typedef struct nni_tls nni_tls; +// nni_tls_config_init creates a new TLS configuration object. +// The object is created with a reference count of one. +extern int nni_tls_config_init(nng_tls_config **, nng_tls_mode); + +// nni_tls_config_fini drops the reference on the configuration +// object, deallocating if this was the last reference. +extern void nni_tls_config_fini(nng_tls_config *); + // nni_tls_config_hold is used to get a hold on the config // object, preventing it from being released inadvertently. // The hold is released with a call to nng_tls_config_fini(). |
