Managing Protocol Services

Pop

lgo_Pop()

Remove the top protocol service from a stack of services.

Syntax
#include "laygo.h"

LResult lgo_Pop
    (
        LCid    cid
    );
cidconnection to remove from the top of the stack
Description

lgo_Pop() removes the top connection from a protocol stack assembled using lgo_Push(). The connection must be in the open state to pop it, and the connection below may not be detached.

Return Values

If successful, lgo_Pop() returns a non-negative value. Otherwise, it returns a negative value indicating the reason it failed. Possible unsuccessful return values are:

See Also

lgo_Push()

Example
LCid    physicalLayer;
LCid    linkLayer;

lgo_Push(physicalLayer, linkLayer);
/* processing... */
lgo_Pop(linkLayer);