lgo_Open()
Reserve system resources for a communication service.
#include "laygo.h" LCid lgo_Open ( LService service );
service | name of entry in the service database to open |
lgo_Open() reserves the system resources required for a communication session using the given service. It does not establish end-to-end communication with a remote system. After opening the connection, the application must call either lgo_ConnectRequest() to initiate a communication session or lgo_Listen() to wait for a remote system to initiate one. All other API functions which apply to a specific connection require a connection identifier returned by lgo_Open() as the first parameter.
If successful, lgo_Open() returns a non-negative connection identifier (CID) which uniquely identifies the connection during subsequent transactions. Otherwise, it returns a negative value indicating the reason it failed. Possible unsuccessful return values are:
LCid cid; if ((cid = lgo_Open("PHYS0") < 0) { return (FAILURE); }