Connecting to and Disconnecting from a Service

ostc::connect()

static ostc_Session* connect(
      oscs_ConstString service_name, 
); 

Establishes a session for using a specified service.

service_name is the name of the service.

When the client calls connect(), a router finds a Component Server that supports the specified service.

The function returns a pointer to a new ostc_Session.

You should retrieve only one session per client thread. Session objects are cached, making connect() (and disconnect()) inexpensive operations.

ostc_RequiredParmMissing is thrown if a router has not been set with ostc::addRouter() or ostcSetRouter.exe.

Click here for an example.

ostc::disconnect()

static void disconnect(ostc_Session*);

Ends the specified session, and disconnects from the session's associated Component Server.

ostc_Session

This class is used by the thin client for the following tasks:



[previous] [next]