Sirikata
|
Classes | |
class | IncompleteStreamState |
Typedefs | |
typedef Array< uint8, TCPStream::MaxWebSocketHeaderSize > | TcpSstHeaderArray |
Functions | |
void | buildStream (TcpSstHeaderArray *buffer, TCPSocket *socket, std::tr1::shared_ptr< TCPStreamListener::Data > data, const boost::system::error_code &error, std::size_t bytes_transferred) |
gets called when a complete 24 byte header is actually received: uses the UUID within to match up appropriate sockets | |
void | beginNewStream (TCPSocket *socket, std::tr1::shared_ptr< TCPStreamListener::Data > data) |
Begins a new stream based on a TCPSocket connection acception with the following substream callback for stream creation Only creates the stream if the handshake is complete and it has all the resources (udp, tcp sockets, etc) necessary at the time. |
typedef Array<uint8,TCPStream::MaxWebSocketHeaderSize> Sirikata::Network::ASIOStreamBuilder::TcpSstHeaderArray |
void Sirikata::Network::ASIOStreamBuilder::beginNewStream | ( | TCPSocket * | socket, |
std::tr1::shared_ptr< TCPStreamListener::Data > | data | ||
) |
Begins a new stream based on a TCPSocket connection acception with the following substream callback for stream creation Only creates the stream if the handshake is complete and it has all the resources (udp, tcp sockets, etc) necessary at the time.
References Sirikata::Array< T, N, integral_type >::begin(), buildStream(), Sirikata::Network::TCPStream::MaxWebSocketHeaderSize, and Sirikata::Network::ASIOReadBuffer::sBufferLength.
Referenced by Sirikata::Network::TCPStreamListener::Data::handleAccept().
void Sirikata::Network::ASIOStreamBuilder::buildStream | ( | TcpSstHeaderArray * | buffer, |
TCPSocket * | socket, | ||
std::tr1::shared_ptr< TCPStreamListener::Data > | data, | ||
const boost::system::error_code & | error, | ||
std::size_t | bytes_transferred | ||
) |
gets called when a complete 24 byte header is actually received: uses the UUID within to match up appropriate sockets
References Sirikata::Array< T, N, integral_type >::begin(), Sirikata::Base64::encode(), Sirikata::Network::MultiplexedSocket::getFirstStreamID(), Sirikata::Network::TCPStream::LENGTH_DELIM, line, Sirikata::Network::TCPSetCallbacks::mCallbacks, Sirikata::Network::TCPStream::RFC_6455, Sirikata::Network::MultiplexedSocket::sendAllProtocolHeaders(), Sirikata::Sha1(), SILOG, Sirikata::UUID::toString(), and Sirikata::Logging::warning.
Referenced by beginNewStream().