Sirikata
|
#include <SpaceNodeConnection.hpp>
typedef std::vector<GotSpaceConnectionCallback> Sirikata::SpaceNodeConnection::ConnectionCallbackList [private] |
typedef std::tr1::function<void(const Network::Stream::ConnectionStatus, const std::string&)> Sirikata::SpaceNodeConnection::ConnectionEventCallback |
typedef std::tr1::function<void(SpaceNodeConnection*) Sirikata::SpaceNodeConnection::GotSpaceConnectionCallback) |
typedef std::tr1::function<void(SpaceNodeConnection*) Sirikata::SpaceNodeConnection::ReceiveCallback) |
Sirikata::SpaceNodeConnection::SpaceNodeConnection | ( | ObjectHostContext * | ctx, |
Network::IOStrand * | ioStrand, | ||
TimeProfiler::Stage * | handle_read_stage, | ||
OptionSet * | streamOptions, | ||
const SpaceID & | spaceid, | ||
ServerID | sid, | ||
OHDP::Service * | ohdp_service, | ||
ConnectionEventCallback | ccb, | ||
ReceiveCallback | rcb | ||
) |
Sirikata::SpaceNodeConnection::~SpaceNodeConnection | ( | ) |
References Sirikata::Liveness::letDie(), and socket.
void Sirikata::SpaceNodeConnection::addCallback | ( | GotSpaceConnectionCallback | cb | ) | [inline] |
void Sirikata::SpaceNodeConnection::connect | ( | const Network::Address & | addr | ) |
References Sirikata::Network::Stream::connect(), handleConnectionEvent(), handleRead(), Sirikata::Network::Stream::ignoreReadySendCallback(), Sirikata::Network::Stream::ignoreSubstreamCallback(), mAddr, Sirikata::Context::mainStrand, mConnecting, mContext, socket, and Sirikata::Network::IOStrand::wrap().
bool Sirikata::SpaceNodeConnection::connecting | ( | ) | const [inline] |
Referenced by Sirikata::SessionManager::getAnySpaceConnection().
bool Sirikata::SpaceNodeConnection::empty | ( | ) |
References Sirikata::QueueRouterElement< PacketType >::empty(), and receive_queue.
Referenced by Sirikata::SessionManager::handleServerMessages().
void Sirikata::SpaceNodeConnection::failConnection | ( | ) |
References invokeAndClearCallbacks(), and mConnecting.
void Sirikata::SpaceNodeConnection::handleConnectionEvent | ( | const Network::Stream::ConnectionStatus | status, |
const std::string & | reason | ||
) | [private] |
References Sirikata::Network::Stream::Connected, invokeAndClearCallbacks(), mConnectCB, mConnecting, and setupConnectionStream().
Referenced by connect().
void Sirikata::SpaceNodeConnection::handleRead | ( | const Sirikata::Network::Chunk & | chunk, |
const Sirikata::Network::Stream::PauseReceiveCallback & | pause | ||
) | [private] |
Referenced by connect().
void Sirikata::SpaceNodeConnection::handleStreamConnected | ( | const Network::Stream::ConnectionStatus | status, |
const std::string & | reason, | ||
int | err, | ||
OHSSTStreamPtr | strm, | ||
uint8 | retries | ||
) | [private] |
void Sirikata::SpaceNodeConnection::invokeAndClearCallbacks | ( | bool | connected | ) |
References mConnectCallbacks.
Referenced by failConnection(), handleConnectionEvent(), and handleStreamConnected().
ObjectMessage * Sirikata::SpaceNodeConnection::pull | ( | ) |
References Sirikata::QueueRouterElement< PacketType >::pull(), and receive_queue.
Referenced by Sirikata::SessionManager::handleServerMessages().
bool Sirikata::SpaceNodeConnection::push | ( | const ObjectMessage & | msg | ) |
const ServerID& Sirikata::SpaceNodeConnection::server | ( | ) | const [inline] |
void Sirikata::SpaceNodeConnection::setupConnectionStream | ( | const Network::Stream::ConnectionStatus | status, |
const std::string & | reason, | ||
uint8 | retries | ||
) | [private] |
References Sirikata::SST::ConnectionManager< EndPointType >::connectStream(), Sirikata::SST::ConnectionManager< EndPointType >::createDatagramLayer(), handleStreamConnected(), mContext, mOHDPService, mServer, mSpace, OBJECT_SPACE_PORT, Sirikata::ObjectHostContext::ohSSTConnMgr(), and Sirikata::OHDP::NodeID::self().
Referenced by handleConnectionEvent(), and handleStreamConnected().
void Sirikata::SpaceNodeConnection::shutdown | ( | ) |
References Sirikata::Network::Stream::close(), and socket.
Referenced by Sirikata::SessionManager::stop().
const SpaceID& Sirikata::SpaceNodeConnection::space | ( | ) | const [inline] |
Referenced by handleStreamConnected().
OHSSTStreamPtr Sirikata::SpaceNodeConnection::stream | ( | ) | const [inline] |
Referenced by Sirikata::SessionManager::handleSpaceSession().
Referenced by connect().
Referenced by invokeAndClearCallbacks().
Referenced by handleConnectionEvent(), and handleStreamConnected().
bool Sirikata::SpaceNodeConnection::mConnecting [private] |
Referenced by connect(), failConnection(), handleConnectionEvent(), and handleStreamConnected().
Referenced by connect(), and setupConnectionStream().
Referenced by setupConnectionStream().
Referenced by handleStreamConnected().
ServerID Sirikata::SpaceNodeConnection::mServer [private] |
Referenced by setupConnectionStream().
SpaceID Sirikata::SpaceNodeConnection::mSpace [private] |
Referenced by setupConnectionStream().
Referenced by connect(), push(), shutdown(), and ~SpaceNodeConnection().