Labyrinth
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends
Public Types | Public Member Functions | List of all members
LxS::Network::Command Class Reference

command is really an LxS name for message sent by either server or client More...

#include <commands.hpp>

Collaboration diagram for LxS::Network::Command:
Collaboration graph

Public Types

enum  IDs {
  ListCharacters = 1, ExportCharacter = 2, ImportCharacter = 3, SerializedCharacter = 4,
  Bye =5, OK =6, Refused =7, Unrecognized =8,
  ReadFile =10, Blob =11, WriteFile =12, Helo =13,
  Login =14, Password =15, StartTransaction =16, EndTransaction =17,
  Error =18, GetTimeout =19, SetTimeout =20, Timeout =21,
  SetPassword =22
}
 predefined list of messages More...
 

Public Member Functions

void * GetData ()
 get data buffer
 
void SetData (const void *d)
 set data buffer
 
int GetCommandID ()
 get command id
 
int GetCommandSize ()
 get command size (of data)
 
void SetCommandID (int id)
 set id (use enum IDs or associated)
 
void SetCommandSize (int siz)
 set command size (of data)
 
int Read (int fd)
 read from fd
 
int Write (int fd)
 write to fd
 
int Recv (int fd)
 read from fd using recv routine
 
int Send (int fd)
 send to fd using send routine
 

Detailed Description

command is really an LxS name for message sent by either server or client

Member Enumeration Documentation

predefined list of messages

Enumerator
ListCharacters 

inquiry (size=0); sent by client; list (newline separated); sent by server

ExportCharacter 

followed by character data; sent by client

ImportCharacter 

followed by character name; sent by client

SerializedCharacter 

followed by character data; sent by server

Bye 

only client message, where response is not expected;

OK 

sent by server, s answer to "ExportCharacter",

Refused 

sent by server if server refused to fulfill calll. textual message may be added in data field

Unrecognized 

not recognized by side

ReadFile 

Access "file" for r/w (sent by client) Read entire blob (command sent by client) (parameter is path)

Blob 

Response for FileRead command (from Server) or followup of Writefile command (from client)

WriteFile 

Command sent from server - to write file (parameter is path)

Helo 

sent by client or server

Login 

login name

Password 

user password

StartTransaction 

start FS transaction (write op sequence)

EndTransaction 

end FS transaction - commit all

Error 

server side error

GetTimeout 

get timeout (in seconds)

SetTimeout 

get timeout (in seconds)

Timeout 

timeout value (4 bytes)

SetPassword 

set password; allowed only if no user exists or user already correctly logged in


The documentation for this class was generated from the following files: