aboutsummaryrefslogtreecommitdiff
path: root/src/supplemental/tls/tls_stream.h
blob: 78760f82b5db306d81d7aeb0e65240777984d4be (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
//
// Copyright 2025 Staysail Systems, Inc. <info@staysail.tech>
// Copyright 2018 Capitar IT Group BV <info@capitar.com>
// Copyright 2019 Devolutions <info@devolutions.net>
//
// This software is supplied under the terms of the MIT License, a
// copy of which should be located in the distribution where this
// file was obtained (LICENSE.txt).  A copy of the license may also be
// found online at https://opensource.org/licenses/MIT.
//

#ifndef NNG_TLS_TLS_STREAM_H
#define NNG_TLS_TLS_STREAM_H

#include "core/nng_impl.h"
#include "tls_common.h"

typedef struct tls_stream_s {
	nng_stream    stream;
	size_t        size;
	nni_reap_node reap;
	nni_aio       conn_aio;
	nni_aio      *user_aio;
	tls_conn      conn; // NB: must be last!
} tls_stream;

extern void nni_tls_stream_free(void *arg);
extern int  nni_tls_stream_alloc(
     tls_stream **tsp, nng_tls_config *cfg, nng_aio *user_aio);

#endif