The organizational unit of all connections is the
struct Rconn C structure, which holds references to the components that make up a connection. Each type of R connection consists of a standardized set of input/output methods (C functions),a private structure for connection-specific use, a function to initialize the
struct Rconn (conventionally named
newconnection), and a function to interface with R-level code (conventionally named
do_connection). The connection-specific input/output methods perform open, close, read, write, and several other operations on the connection. The
struct Rconn structure additionally holds some symbols that are used by the character re-encoding and finalization mechanisms. Readers will find a complete listing and boilerplate descriptions of the standard input/output routines and other symbols referenced by the
struct Rconn structure in the section on C structures (see C Structures).