Managing Protocol Services

Attach

lgo_Attach()

Attach to a communication service.

Syntax
#include "laygo.h"

LCid    lgo_Attach
    (
        LService    service
    );
servicename of the service as given to lgo_Open()
Description

lgo_Attach() attaches to a service which was previously opened with lgo_Open() and detached with lgo_Detach().

lgo_Attach() returns a CID exactly as lgo_Open() does. However, the connection may not be in the open state. lgo_State() can be used to determine what state the connection is in.

Return Values

If successful, lgo_Attach() 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_Open()
lgo_Detach()

Example
LCid    cid;

cid = lgo_Attach("PHYS0");