NOVA User-Level Environment
Version testbox/changed-memory-timing-317-g320d8b5
|
A simple per-cpu client. More...
#include <client.h>
Public Member Functions | |
Client (pollfd &pfd, struct sockaddr_in &addr, bool hp=false) | |
Client (int fd, struct sockaddr_in &addr, bool hp=false) | |
void | touch () |
unsigned | idle_secs () |
unsigned | secs_until_timeout () |
string | name () |
pollfd * | get_pfd () const |
int | msg (const char *fmt,...) __attribute__((format(printf |
va_start (ap, fmt) | |
va_end (ap) | |
if (l > 0 &&str[l-1]== '\n') str[l-1]=0 | |
msg ("%s: %s\n", name().c_str(), str) | |
free (str) | |
void | add_to_queue (bool as_first=false) |
void | print_queue () |
void | del_from_queue () |
void | bye_bye (const string &message) |
bool | is_active () const |
unsigned | clients_before (string &who) |
bool | interpret_as_command (char ch, string &to_relay) |
bool | handle () |
void | send (const char *str, size_t len) |
void | send (const string &str) |
unsigned | call () |
Client (Utcb &utcb, CapAllocator *cap, const char *service, unsigned instance, bool blocking=true, bool single=false) | |
~Client () |
Public Attributes | |
bool | high_prio |
int va_list | ap |
int | ret |
char * | str |
ret = vasprintf(&str, fmt, ap) | |
unsigned | l = strlen(str) |
return | ret |
Static Public Attributes | |
static Client * | active |
static IpRelay * | ip_relay |
static const int | timeout_secs = 20*60 |
Protected Attributes | |
Utcb & | _utcb |
CapAllocator * | _cap_alloc |
const char * | _service |
unsigned | _session |
unsigned | _pseudonym |
unsigned | _portal |
bool | _single |
Private Member Functions | |
Client (const Client &) | |
Client & | operator= (const Client &) |
Private Attributes | |
Client * | next |
int | fd |
pollfd * | pfd |
struct sockaddr_in | addr |
char | buf [4096] |
string | to_client |
CommandStr | command |
struct timeval | last_activity |
A simple per-cpu client.
Constructing a CpuLocalClient implicitly creates a session to the given service. Sessions are not closed on object destruction, as it might interfere with modularity (see comments in ~CpuLocalClient). Subclasses of CpuLocalClient (and services) are expected to add another layer to multiplex multiple connections using the same pseudonym (i.e. running in the same PD).
|
private |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
Client::free | ( | str | ) |
|
inline |
|
inline |
|
inline |
|
pure virtual |
|
inline |
|
inline |
int Client::msg | ( | const char * | fmt, |
... | |||
) |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
Client::va_end | ( | ap | ) |
Client::va_start | ( | ap | , |
fmt | |||
) |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
static |
|
private |
int va_list Client::ap |
|
private |
|
private |
|
private |
bool Client::high_prio |
|
static |
|
private |
|
private |
|
private |
int Client::ret |
return Client::ret |
char* Client::str |
|
static |
|
private |