Kyoto Tycoon
Classes | Public Member Functions | Friends
kyototycoon::RPCServer::Session Class Reference

Interface to log internal information and errors. More...

#include <ktrpc.h>

List of all members.

Classes

class  Data
 Interface of session local data. More...

Public Member Functions

uint64_t id ()
 Get the ID number of the session.
uint32_t thread_id ()
 Get the ID number of the worker thread.
void set_data (Data *data)
 Set the session local data.
Datadata ()
 Get the session local data.
const std::string expression ()
 Get the expression of the socket.

Friends

class RPCServer

Detailed Description

Interface to log internal information and errors.


Member Function Documentation

Get the ID number of the session.

Returns:
the ID number of the session.

Get the ID number of the worker thread.

Returns:
the ID number of the worker thread. It is from 0 to less than the number of worker threads.

Set the session local data.

Parameters:
datathe session local data. If it is NULL, no data is registered.
Note:
The registered data is destroyed implicitly when the session object is destroyed or this method is called again.

Get the session local data.

Returns:
the session local data, or NULL if no data is registered.

Get the expression of the socket.

Returns:
the expression of the socket or an empty string on failure.