diff options
Diffstat (limited to 'common/trans.h')
-rw-r--r-- | common/trans.h | 17 |
1 files changed, 13 insertions, 4 deletions
diff --git a/common/trans.h b/common/trans.h index a169e9cb..fbf08f01 100644 --- a/common/trans.h +++ b/common/trans.h @@ -41,8 +41,9 @@ typedef int (DEFAULT_CC *ttrans_data_in)(struct trans* self); typedef int (DEFAULT_CC *ttrans_conn_in)(struct trans* self, struct trans* new_self); typedef int (DEFAULT_CC *tis_term)(void); -typedef int (APP_CC *trans_recv) (struct trans *self, void *ptr, int len); -typedef int (APP_CC *trans_send) (struct trans *self, const void *data, int len); +typedef int (APP_CC *trans_recv_proc) (struct trans *self, void *ptr, int len); +typedef int (APP_CC *trans_send_proc) (struct trans *self, const void *data, int len); +typedef int (APP_CC *trans_can_recv_proc) (struct trans *self, int sck, int millis); struct trans { @@ -64,8 +65,9 @@ struct trans int no_stream_init_on_data_in; int extra_flags; /* user defined */ struct xrdp_tls *tls; - trans_recv trans_recv; - trans_send trans_send; + trans_recv_proc trans_recv; + trans_send_proc trans_send; + trans_can_recv_proc trans_can_recv; }; /* xrdp_tls */ @@ -76,6 +78,7 @@ struct xrdp_tls char *cert; char *key; struct trans *trans; + tintptr rwo; /* wait obj */ }; /* xrdp_tls.c */ @@ -87,6 +90,12 @@ int APP_CC xrdp_tls_disconnect(struct xrdp_tls *self); void APP_CC xrdp_tls_delete(struct xrdp_tls *self); +int APP_CC +xrdp_tls_read(struct xrdp_tls *tls, char *data, int length); +int APP_CC +xrdp_tls_write(struct xrdp_tls *tls, const char *data, int length); +int APP_CC +xrdp_tls_can_recv(struct xrdp_tls *tls, int sck, int millis); struct trans* APP_CC trans_create(int mode, int in_size, int out_size); |