typedefint (*ttrans_data_in)(struct trans *self); typedefint (*ttrans_conn_in)(struct trans *self, struct trans *new_self); typedefint (*tis_term)(void); typedefint (*trans_recv_proc) (struct trans *self, char *ptr, int len); typedefint (*trans_send_proc) (struct trans *self, constchar *data, int len); typedefint (*trans_can_recv_proc) (struct trans *self, int sck, int millis);
struct trans
{
tbus sck; /* socket handle */ int mode; /* 1 tcp, 2 unix socket, 3 vsock */ int status; int type1; /* 1 listener 2 server 3 client */
ttrans_data_in trans_data_in;
ttrans_conn_in trans_conn_in; void *callback_data; unsignedint header_size; struct stream *in_s; struct stream *out_s; char *listen_filename;
tis_term is_term; /* used to test for exit */ struct stream *wait_s; 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 trans *
trans_create(int mode, int in_size, int out_size); void
trans_delete(struct trans *self); void
trans_delete_from_child(struct trans *self); int
trans_get_wait_objs(struct trans *self, tbus *objs, int *count); int
trans_get_wait_objs_rw(struct trans *self,
tbus *robjs, int *rcount,
tbus *wobjs, int *wcount, int *timeout); int
trans_check_wait_objs(struct trans *self); int
trans_force_read_s(struct trans *self, struct stream *in_s, int size); int
trans_force_write_s(struct trans *self, struct stream *out_s); int
trans_force_read(struct trans *self, int size); int
trans_force_write(struct trans *self); int
trans_write_copy(struct trans *self); int
trans_write_copy_s(struct trans *self, struct stream *out_s); /** *Connectthetransporttothespecifieddestination * *@paramselfTransport *@paramserverDestinationserver(TCPtransportsonly) *@paramportTCPport,orUNIXsockettoconnectto *@paramtimeoutinmilli-secondsfortheoperation *@return0forsuccess * *Multipleconnectionattemptsmaybemadewithinthetimeoutperiod. * *Iftheoperationisnotsuccessful,errnowillhavebeensetby *thelastconnectionattempt. * *Iftheoperationissuccessful,0isreturnedandself->statuswill *beTRANS_STATUS_UP
*/ int
trans_connect(struct trans *self, constchar *server, constchar *port, int timeout); int
trans_listen_address(struct trans *self, constchar *port, constchar *address); int
trans_listen(struct trans *self, constchar *port); struct stream *
trans_get_in_s(struct trans *self); struct stream *
trans_get_out_s(struct trans *self, int size); int
trans_set_tls_mode(struct trans *self, constchar *key, constchar *cert, long ssl_protocols, constchar *tls_ciphers); int
trans_shutdown_tls_mode(struct trans *self); int
trans_tcp_force_read_s(struct trans *self, struct stream *in_s, int size);
#endif
Messung V0.5 in Prozent
¤ Dauer der Verarbeitung: 0.11 Sekunden
(vorverarbeitet am 2026-07-10)
¤
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.