Loading...
Searching...
No Matches
tcp_transport.h
/*
* This file is part of RTRlib.
*
* This file is subject to the terms and conditions of the MIT license.
* See the file LICENSE in the top level directory for more details.
*
* Website: http://rtrlib.realmv6.org/
*/
#ifndef RTR_TCP_TRANSPORT_H
#define RTR_TCP_TRANSPORT_H
#include "rtrlib/transport/transport.h"
struct tr_tcp_config {
char *host;
char *port;
char *bindaddr;
void *data;
int (*new_socket)(void *data);
unsigned int connect_timeout;
};
int tr_tcp_init(const struct tr_tcp_config *config, struct tr_socket *socket);
#endif
tr_tcp_init
int tr_tcp_init(const struct tr_tcp_config *config, struct tr_socket *socket)
Initializes the tr_socket struct for a TCP connection.
tr_socket
A transport socket datastructure.
Definition transport.h:102
tr_tcp_config
A tr_tcp_config struct holds configuration for a TCP connection.
Definition tcp_transport.h:41