RTRlib
Loading...
Searching...
No Matches
tr_tcp_config Struct Reference

A tr_tcp_config struct holds configuration for a TCP connection. More...

#include <tcp_transport.h>

Data Fields

char * host
 
char * port
 
char * bindaddr
 
void * data
 
int(* new_socket )(void *data)
 
unsigned int connect_timeout
 

Detailed Description

A tr_tcp_config struct holds configuration for a TCP connection.

Parameters
hostHostname or IP address to connect to.
portPort to connect to.
bindaddrHostname or IP address to connect from. NULL for determination by OS. to use the source address of the system's default route to the server
dataInformation to pass to callback function in charge of retrieving socket
new_socket(void*opaque_info) callback routine, that Pointer to the function that is called every time a new connection is made. The returned socket is expected to be ready for use (e.g. in state established), and must use a reliably stream-oriented transport. When new_socket() is used, host, port, and bindaddr are not used.
connect_timeoutTime in seconds to wait for a successful connection. Defaults to RTRLIB_TRANSPORT_CONNECT_TIMEOUT_DEFAULT

Field Documentation

◆ bindaddr

char* tr_tcp_config::bindaddr

◆ connect_timeout

unsigned int tr_tcp_config::connect_timeout

◆ data

void* tr_tcp_config::data

◆ host

char* tr_tcp_config::host

◆ new_socket

int(* tr_tcp_config::new_socket) (void *data)

◆ port

char* tr_tcp_config::port

The documentation for this struct was generated from the following file: