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

#include <i2psam.h>

Collaboration diagram for SAM::StreamSession:
[legend]

Classes

struct  ForwardedStream
 

Public Member Functions

 StreamSession (const std::string &nickname, const std::string &SAMHost=SAM_DEFAULT_ADDRESS, uint16_t SAMPort=SAM_DEFAULT_PORT, const std::string &destination=SAM_GENERATE_MY_DESTINATION, const std::string &i2pOptions=SAM_DEFAULT_I2P_OPTIONS, const std::string &minVer=SAM_DEFAULT_MIN_VER, const std::string &maxVer=SAM_DEFAULT_MAX_VER)
 
 StreamSession (StreamSession &rhs)
 
 ~StreamSession ()
 
RequestResult< std::auto_ptr< Socket > > accept (bool silent)
 
RequestResult< std::auto_ptr< Socket > > connect (const std::string &destination, bool silent)
 
RequestResult< void > forward (const std::string &host, uint16_t port, bool silent)
 
RequestResult< const std::string > namingLookup (const std::string &name) const
 
RequestResult< const FullDestinationdestGenerate () const
 
void stopForwarding (const std::string &host, uint16_t port)
 
void stopForwardingAll ()
 
const FullDestinationgetMyDestination () const
 
const sockaddr_in & getSAMAddress () const
 
const std::string & getSAMHost () const
 
uint16_t getSAMPort () const
 
const std::string & getNickname () const
 
const std::string & getSessionID () const
 
const std::string & getSAMMinVer () const
 
const std::string & getSAMMaxVer () const
 
const std::string & getSAMVersion () const
 
const std::string & getOptions () const
 
bool isSick () const
 

Static Public Member Functions

static std::string generateSessionID ()
 

Private Types

typedef std::list< ForwardedStreamForwardedStreamsContainer
 

Private Member Functions

 StreamSession (const StreamSession &rhs)
 
StreamSessionoperator= (const StreamSession &rhs)
 
void fallSick () const
 
FullDestination createStreamSession (const std::string &destination)
 

Static Private Member Functions

static Message::Answer< const std::string > rawRequest (Socket &socket, const std::string &requestStr)
 
static Message::Answer< const std::string > request (Socket &socket, const std::string &requestStr, const std::string &keyOnSuccess)
 
static Message::eStatus request (Socket &socket, const std::string &requestStr)
 
static Message::Answer< const std::string > createStreamSession (Socket &socket, const std::string &sessionID, const std::string &nickname, const std::string &destination, const std::string &options)
 
static Message::Answer< const std::string > namingLookup (Socket &socket, const std::string &name)
 
static Message::Answer< const FullDestinationdestGenerate (Socket &socket)
 
static Message::eStatus accept (Socket &socket, const std::string &sessionID, bool silent)
 
static Message::eStatus connect (Socket &socket, const std::string &sessionID, const std::string &destination, bool silent)
 
static Message::eStatus forward (Socket &socket, const std::string &sessionID, const std::string &host, uint16_t port, bool silent)
 

Private Attributes

Socket socket_
 
const std::string nickname_
 
const std::string sessionID_
 
FullDestination myDestination_
 
const std::string i2pOptions_
 
ForwardedStreamsContainer forwardedStreams_
 
bool isSick_
 

Detailed Description

Definition at line 339 of file i2psam.h.

Member Typedef Documentation

Definition at line 393 of file i2psam.h.

Constructor & Destructor Documentation

SAM::StreamSession::StreamSession ( const std::string &  nickname,
const std::string &  SAMHost = SAM_DEFAULT_ADDRESS,
uint16_t  SAMPort = SAM_DEFAULT_PORT,
const std::string &  destination = SAM_GENERATE_MY_DESTINATION,
const std::string &  i2pOptions = SAM_DEFAULT_I2P_OPTIONS,
const std::string &  minVer = SAM_DEFAULT_MIN_VER,
const std::string &  maxVer = SAM_DEFAULT_MAX_VER 
)

Definition at line 260 of file i2psam.cpp.

Here is the call graph for this function:

SAM::StreamSession::StreamSession ( StreamSession rhs)
explicit

Definition at line 280 of file i2psam.cpp.

Here is the call graph for this function:

SAM::StreamSession::~StreamSession ( )

Definition at line 300 of file i2psam.cpp.

Here is the call graph for this function:

SAM::StreamSession::StreamSession ( const StreamSession rhs)
private

Member Function Documentation

RequestResult< std::auto_ptr< Socket > > SAM::StreamSession::accept ( bool  silent)

Definition at line 328 of file i2psam.cpp.

Here is the call graph for this function:

Message::eStatus SAM::StreamSession::accept ( Socket socket,
const std::string &  sessionID,
bool  silent 
)
staticprivate

Definition at line 535 of file i2psam.cpp.

Here is the call graph for this function:

RequestResult< std::auto_ptr< Socket > > SAM::StreamSession::connect ( const std::string &  destination,
bool  silent 
)

Definition at line 350 of file i2psam.cpp.

Here is the call graph for this function:

Message::eStatus SAM::StreamSession::connect ( Socket socket,
const std::string &  sessionID,
const std::string &  destination,
bool  silent 
)
staticprivate

Definition at line 541 of file i2psam.cpp.

Here is the call graph for this function:

FullDestination SAM::StreamSession::createStreamSession ( const std::string &  destination)
private

Definition at line 438 of file i2psam.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

Message::Answer< const std::string > SAM::StreamSession::createStreamSession ( Socket socket,
const std::string &  sessionID,
const std::string &  nickname,
const std::string &  destination,
const std::string &  options 
)
staticprivate

Definition at line 508 of file i2psam.cpp.

Here is the call graph for this function:

RequestResult< const FullDestination > SAM::StreamSession::destGenerate ( ) const

Definition at line 417 of file i2psam.cpp.

Here is the call graph for this function:

Message::Answer< const FullDestination > SAM::StreamSession::destGenerate ( Socket socket)
staticprivate

Definition at line 520 of file i2psam.cpp.

Here is the call graph for this function:

void SAM::StreamSession::fallSick ( ) const
private

Definition at line 451 of file i2psam.cpp.

Here is the caller graph for this function:

RequestResult< void > SAM::StreamSession::forward ( const std::string &  host,
uint16_t  port,
bool  silent 
)

Definition at line 372 of file i2psam.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

Message::eStatus SAM::StreamSession::forward ( Socket socket,
const std::string &  sessionID,
const std::string &  host,
uint16_t  port,
bool  silent 
)
staticprivate

Definition at line 547 of file i2psam.cpp.

Here is the call graph for this function:

std::string SAM::StreamSession::generateSessionID ( )
static

Definition at line 309 of file i2psam.cpp.

const FullDestination & SAM::StreamSession::getMyDestination ( ) const

Definition at line 567 of file i2psam.cpp.

const std::string & SAM::StreamSession::getNickname ( ) const

Definition at line 552 of file i2psam.cpp.

const std::string & SAM::StreamSession::getOptions ( ) const

Definition at line 562 of file i2psam.cpp.

const sockaddr_in & SAM::StreamSession::getSAMAddress ( ) const

Definition at line 577 of file i2psam.cpp.

Here is the call graph for this function:

const std::string & SAM::StreamSession::getSAMHost ( ) const

Definition at line 582 of file i2psam.cpp.

Here is the call graph for this function:

const std::string & SAM::StreamSession::getSAMMaxVer ( ) const

Definition at line 597 of file i2psam.cpp.

Here is the call graph for this function:

const std::string & SAM::StreamSession::getSAMMinVer ( ) const

Definition at line 592 of file i2psam.cpp.

Here is the call graph for this function:

uint16_t SAM::StreamSession::getSAMPort ( ) const

Definition at line 587 of file i2psam.cpp.

Here is the call graph for this function:

const std::string & SAM::StreamSession::getSAMVersion ( ) const

Definition at line 602 of file i2psam.cpp.

Here is the call graph for this function:

const std::string & SAM::StreamSession::getSessionID ( ) const

Definition at line 557 of file i2psam.cpp.

bool SAM::StreamSession::isSick ( ) const

Definition at line 572 of file i2psam.cpp.

RequestResult< const std::string > SAM::StreamSession::namingLookup ( const std::string &  name) const

Definition at line 396 of file i2psam.cpp.

Here is the call graph for this function:

Message::Answer< const std::string > SAM::StreamSession::namingLookup ( Socket socket,
const std::string &  name 
)
staticprivate

Definition at line 514 of file i2psam.cpp.

Here is the call graph for this function:

StreamSession& SAM::StreamSession::operator= ( const StreamSession rhs)
private
Message::Answer< const std::string > SAM::StreamSession::rawRequest ( Socket socket,
const std::string &  requestStr 
)
staticprivate

Definition at line 478 of file i2psam.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

Message::Answer< const std::string > SAM::StreamSession::request ( Socket socket,
const std::string &  requestStr,
const std::string &  keyOnSuccess 
)
staticprivate

Definition at line 491 of file i2psam.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

Message::eStatus SAM::StreamSession::request ( Socket socket,
const std::string &  requestStr 
)
staticprivate

Definition at line 502 of file i2psam.cpp.

Here is the call graph for this function:

void SAM::StreamSession::stopForwarding ( const std::string &  host,
uint16_t  port 
)

Definition at line 456 of file i2psam.cpp.

void SAM::StreamSession::stopForwardingAll ( )

Definition at line 470 of file i2psam.cpp.

Here is the caller graph for this function:

Member Data Documentation

ForwardedStreamsContainer SAM::StreamSession::forwardedStreams_
private

Definition at line 400 of file i2psam.h.

const std::string SAM::StreamSession::i2pOptions_
private

Definition at line 399 of file i2psam.h.

bool SAM::StreamSession::isSick_
mutableprivate

Definition at line 401 of file i2psam.h.

FullDestination SAM::StreamSession::myDestination_
private

Definition at line 398 of file i2psam.h.

const std::string SAM::StreamSession::nickname_
private

Definition at line 396 of file i2psam.h.

const std::string SAM::StreamSession::sessionID_
private

Definition at line 397 of file i2psam.h.

Socket SAM::StreamSession::socket_
private

Definition at line 395 of file i2psam.h.


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