Anoncoin  0.9.4
P2P Digital Currency
Classes | Public Types | Static Public Member Functions | Static Private Member Functions | List of all members
SAM::Message Class Reference

#include <i2psam.h>

Classes

struct  Answer
 

Public Types

enum  SessionStyle { sssStream, sssDatagram, sssRaw }
 
enum  eStatus {
  OK, EMPTY_ANSWER, CLOSED_SOCKET, CANNOT_PARSE_ERROR,
  DUPLICATED_DEST, DUPLICATED_ID, I2P_ERROR, INVALID_ID,
  INVALID_KEY, CANT_REACH_PEER, TIMEOUT, NOVERSION,
  KEY_NOT_FOUND, PEER_NOT_FOUND, ALREADY_ACCEPTING, FAILED,
  CLOSED
}
 

Static Public Member Functions

static std::string hello (const std::string &minVer, const std::string &maxVer)
 
static std::string sessionCreate (SessionStyle style, const std::string &sessionID, const std::string &nickname, const std::string &destination=SAM_GENERATE_MY_DESTINATION, const std::string &options="")
 
static std::string streamAccept (const std::string &sessionID, bool silent=false)
 
static std::string streamConnect (const std::string &sessionID, const std::string &destination, bool silent=false)
 
static std::string streamForward (const std::string &sessionID, const std::string &host, uint16_t port, bool silent=false)
 
static std::string namingLookup (const std::string &name)
 
static std::string destGenerate ()
 
static eStatus checkAnswer (const std::string &answer)
 
static std::string getValue (const std::string &answer, const std::string &key)
 

Static Private Member Functions

static std::string createSAMRequest (const char *format,...)
 

Detailed Description

Definition at line 71 of file i2psam.h.

Member Enumeration Documentation

Enumerator
OK 
EMPTY_ANSWER 
CLOSED_SOCKET 
CANNOT_PARSE_ERROR 
DUPLICATED_DEST 
DUPLICATED_ID 
I2P_ERROR 
INVALID_ID 
INVALID_KEY 
CANT_REACH_PEER 
TIMEOUT 
NOVERSION 
KEY_NOT_FOUND 
PEER_NOT_FOUND 
ALREADY_ACCEPTING 
FAILED 
CLOSED 

Definition at line 81 of file i2psam.h.

Enumerator
sssStream 
sssDatagram 
sssRaw 

Definition at line 74 of file i2psam.h.

Member Function Documentation

Message::eStatus SAM::Message::checkAnswer ( const std::string &  answer)
static

Definition at line 772 of file i2psam.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

std::string SAM::Message::createSAMRequest ( const char *  format,
  ... 
)
staticprivate

Definition at line 610 of file i2psam.cpp.

Here is the caller graph for this function:

std::string SAM::Message::destGenerate ( )
static

Definition at line 750 of file i2psam.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

std::string SAM::Message::getValue ( const std::string &  answer,
const std::string &  key 
)
static

Definition at line 799 of file i2psam.cpp.

Here is the caller graph for this function:

std::string SAM::Message::hello ( const std::string &  minVer,
const std::string &  maxVer 
)
static

Definition at line 630 of file i2psam.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

std::string SAM::Message::namingLookup ( const std::string &  name)
static

Definition at line 732 of file i2psam.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

std::string SAM::Message::sessionCreate ( SessionStyle  style,
const std::string &  sessionID,
const std::string &  nickname,
const std::string &  destination = SAM_GENERATE_MY_DESTINATION,
const std::string &  options = "" 
)
static

Definition at line 648 of file i2psam.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

std::string SAM::Message::streamAccept ( const std::string &  sessionID,
bool  silent = false 
)
static

Definition at line 676 of file i2psam.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

std::string SAM::Message::streamConnect ( const std::string &  sessionID,
const std::string &  destination,
bool  silent = false 
)
static

Definition at line 694 of file i2psam.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

std::string SAM::Message::streamForward ( const std::string &  sessionID,
const std::string &  host,
uint16_t  port,
bool  silent = false 
)
static

Definition at line 713 of file i2psam.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:


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