10 #ifndef __TCP_CHANNEL_H__ 11 #define __TCP_CHANNEL_H__ 21 #if ! defined(BRP_NO_SOCKET_HEADERS) 33 typedef int socklen_t;
36 #if defined(__GNUC__) && !defined(InetNtopA) 37 PCSTR WSAAPI inet_ntop(INT Family, PVOID pAddr, PSTR pStringBuf,
38 size_t StringBufSize);
42 #include <sys/socket.h> 44 #include <sys/ioctl.h> 45 #include <arpa/inet.h> 46 #define closesocket close 47 #define ioctlsocket ioctl 48 #define INVALID_SOCKET (-1) 49 #define SOCKET_ERROR (-1) 50 #define SD_BOTH SHUT_RDWR 67 #if ! defined(BRP_DEFAULT_TCP_PORT) 68 #define BRP_DEFAULT_TCP_PORT 2939 85 #define BRP_DEFAULT_TCPIP_ROUNDTRIP_TIMEOUT 1500 BRP_LIB brp_protocol brp_create_tcpip_by_socket(int socket)
Creates a TCP/IP protocol from an OS-level socket that was created by the user of the BRP library...
unsigned int brp_errcode
This type is used library-wide for passing error codes in the return value of functions.
BRP_LIB brp_time brp_get_tcpip_roundtrip_timeout(brp_protocol protocol)
Retrieves the value of the roundtrip timeout set by the last brp_set_tcpip_roundtrip_timeout().
struct brp_protocol_t * brp_protocol
This is a generic handle of a protocol.
BRP_LIB brp_protocol brp_create_tcpip(char *ipaddr)
Creates a TCP/IP protocol from an IP address.
unsigned long brp_time
absolute/relative timeout/delay in ms.
This file primarly defines the common part of all protocol's data structures (:brp_protocol_t) and AP...
BRP_LIB brp_errcode brp_set_tcpip_roundtrip_timeout(brp_protocol protocol, brp_time timeout)
If the value of BRP_DEFAULT_TCPIP_ROUNDTRIP_TIMEOUT is not appropriate it can be finetuned for specif...
BRP_LIB char * brp_get_tcpip_ipaddr(brp_protocol protocol)
Retrieves the ipaddr set in brp_create_tcpip().