Sirikata
Classes | Public Types | Public Member Functions | Static Public Member Functions | Public Attributes
Sirikata::Network::TCPStreamListener Class Reference

This class waits on a service and listens for incoming connections It calls the callback whenever such connections are encountered. More...

#include <TCPStreamListener.hpp>

Inheritance diagram for Sirikata::Network::TCPStreamListener:
Collaboration diagram for Sirikata::Network::TCPStreamListener:

List of all members.

Classes

struct  Data

Public Types

typedef std::tr1::shared_ptr
< Data
DataPtr

Public Member Functions

 TCPStreamListener (IOStrand *, OptionSet *)
virtual ~TCPStreamListener ()
virtual bool listen (const Address &addr, const Stream::SubstreamCallback &newStreamCallback)
 subclasses will expose these methods with similar arguments + protocol specific args
virtual String listenAddressName () const
 returns thea name of the computer followed by a colon and then the service being listened on
virtual Address listenAddress () const
 returns thea name of the computer followed by a colon and then the service being listened on
virtual void close ()
 stops listening

Static Public Member Functions

static TCPStreamListenerconstruct (Network::IOStrand *io, OptionSet *options)

Public Attributes

DataPtr mData

Detailed Description

This class waits on a service and listens for incoming connections It calls the callback whenever such connections are encountered.


Member Typedef Documentation

typedef std::tr1::shared_ptr<Data> Sirikata::Network::TCPStreamListener::DataPtr

Constructor & Destructor Documentation

Sirikata::Network::TCPStreamListener::TCPStreamListener ( IOStrand io,
OptionSet options 
)
Sirikata::Network::TCPStreamListener::~TCPStreamListener ( ) [virtual]

References close().


Member Function Documentation

void Sirikata::Network::TCPStreamListener::close ( ) [virtual]

stops listening

Implements Sirikata::Network::StreamListener.

References Sirikata::Logging::error, mData, and SILOG.

Referenced by listen(), and ~TCPStreamListener().

static TCPStreamListener* Sirikata::Network::TCPStreamListener::construct ( Network::IOStrand io,
OptionSet options 
) [inline, static]

References TCPStreamListener().

Referenced by init().

bool Sirikata::Network::TCPStreamListener::listen ( const Address addy,
const Stream::SubstreamCallback newStreamCallback 
) [virtual]

subclasses will expose these methods with similar arguments + protocol specific args

Implements Sirikata::Network::StreamListener.

References close(), Sirikata::Network::Address::getService(), and mData.

Address Sirikata::Network::TCPStreamListener::listenAddress ( ) const [virtual]

returns thea name of the computer followed by a colon and then the service being listened on

Implements Sirikata::Network::StreamListener.

References mData.

String Sirikata::Network::TCPStreamListener::listenAddressName ( ) const [virtual]

returns thea name of the computer followed by a colon and then the service being listened on

Implements Sirikata::Network::StreamListener.

References mData.


Member Data Documentation


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