C API for BALTECH SDK

§ brp_create_tcpip_by_socket()

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.

This is usually be used to implement server side BRP connections (where the reader is the client and connects to this appplication).

Attention: If a protocol is created this way, brp_get_tcpip_ipaddr() will return NULL.

Returns
a TCP/IP protocol, that can be used for sessions or NULL, if out of memory.
Parameters
socketany file handle that represents a TCP connection