Open Lighting Architecture
0.9.3
|
Represents the RPC session between a client and server.
The RPCSession object contains information about the session an RPC is part of. For each RPC method on the server side, the RPCSession can be accessed via the RpcController::Session() method.
Sessions can have arbitary user data associated with them, similar to a cookie in an HTTP request. The user data is usually set in the call to RpcSessionHandlerInterface::NewClient() but can be set or modified in any of the RPC calls themselves.
Since the RPCSession object doesn't take ownership of the user data, its should be deleted in the call to RpcSessionHandlerInterface::ClientRemoved().
Public Member Functions | |
RpcSession (RpcChannel *channel) | |
Create a new session object. | |
RpcChannel * | Channel () |
Returns the underlying RPCChannel. | |
void | SetData (void *ptr) |
Associate user data with this session. | |
void * | GetData () const |
Retrieve the user data associated with this session. |
|
inlineexplicit |
Create a new session object.
channel | the RpcChannel that the session is using. Ownership is not transferred. |
|
inline |
Returns the underlying RPCChannel.
|
inline |
Retrieve the user data associated with this session.
|
inline |
Associate user data with this session.
ptr | Opaque user data to associate with this session. Ownership is not transferred. |