Kyoto Tycoon

- Main Page
- Namespaces
- Classes
- Files

- Class List
- Class Index
- Class Hierarchy
- Class Members

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.
Data * | data ()
| 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

uint64_t kyototycoon::RPCServer::Session::id | ( |  | ) |

Get the ID number of the session.

Returns:
  the ID number of the session.

uint32_t kyototycoon::RPCServer::Session::thread_id | ( |  | ) |

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.

void kyototycoon::RPCServer::Session::set_data | ( | Data * | data | ) |

Set the session local data.

Parameters:

  data | the 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.

Data* kyototycoon::RPCServer::Session::data | ( |  | ) |

Get the session local data.

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

const std::string kyototycoon::RPCServer::Session::expression | ( |  | ) |

Get the expression of the socket.

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