lgo_Attach()
Attach to a communication service.
#include "laygo.h" LCid lgo_Attach ( LService service );
service | name of the service as given to lgo_Open() |
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.
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:
LCid cid; cid = lgo_Attach("PHYS0");