Add subclassing capability to struct trans
This commit is contained in:
parent
d5f99f41ac
commit
8f4860cb55
@ -120,6 +120,12 @@ trans_delete(struct trans *self)
|
||||
return;
|
||||
}
|
||||
|
||||
/* Call the user-specified destructor if one exists */
|
||||
if (self->extra_destructor != NULL)
|
||||
{
|
||||
self->extra_destructor(self);
|
||||
}
|
||||
|
||||
free_stream(self->in_s);
|
||||
free_stream(self->out_s);
|
||||
|
||||
|
@ -108,6 +108,9 @@ struct trans
|
||||
char port[256];
|
||||
int no_stream_init_on_data_in;
|
||||
int extra_flags; /* user defined */
|
||||
void *extra_data; /* user defined */
|
||||
void (*extra_destructor)(struct trans *); /* user defined */
|
||||
|
||||
struct ssl_tls *tls;
|
||||
const char *ssl_protocol; /* e.g. TLSv1, TLSv1.1, TLSv1.2, unknown */
|
||||
const char *cipher_name; /* e.g. AES256-GCM-SHA384 */
|
||||
|
Loading…
Reference in New Issue
Block a user