RTRlib
Loading...
Searching...
No Matches
tcp_transport.h
Go to the documentation of this file.
1/*
2 * This file is part of RTRlib.
3 *
4 * This file is subject to the terms and conditions of the MIT license.
5 * See the file LICENSE in the top level directory for more details.
6 *
7 * Website: http://rtrlib.realmv6.org/
8 */
9
19#ifndef RTR_TCP_TRANSPORT_H
20#define RTR_TCP_TRANSPORT_H
21
23
42 char *host;
43 char *port;
44 char *bindaddr;
45 void *data;
46 int (*new_socket)(void *data);
47 unsigned int connect_timeout;
48};
49
57int tr_tcp_init(const struct tr_tcp_config *config, struct tr_socket *socket);
58#endif
int tr_tcp_init(const struct tr_tcp_config *config, struct tr_socket *socket)
Initializes the tr_socket struct for a TCP connection.
A transport socket datastructure.
Definition transport.h:102
A tr_tcp_config struct holds configuration for a TCP connection.
Definition tcp_transport.h:41
char * bindaddr
Definition tcp_transport.h:44
unsigned int connect_timeout
Definition tcp_transport.h:47
void * data
Definition tcp_transport.h:45
char * host
Definition tcp_transport.h:42
int(* new_socket)(void *data)
Definition tcp_transport.h:46
char * port
Definition tcp_transport.h:43