Managing Protocol Services

Open

lgo_Open()

Reserve system resources for a communication service.

Syntax
#include "laygo.h"

LCid    lgo_Open
    (
        LService   service
    );
servicename of entry in the service database to open
Description

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.

Return Values

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:

See Also

lgo_Attach()
lgo_Close()
lgo_Reopen()

Example
LCid    cid;

if ((cid = lgo_Open("PHYS0") < 0)
{
    return (FAILURE);
}