$search

castor::net::channels::Tcp Class Reference

#include <Tcp.h>

Inheritance diagram for castor::net::channels::Tcp:
Inheritance graph
[legend]

List of all members.

Classes

class  Connection

Public Member Functions

virtual void accept () throw (NetException)
virtual void bind ()
virtual void close (const NetAddress &address) throw (NetException)
virtual void close () throw (NetException)
virtual void connect () throw (NetException)
virtual bool enableBroadcast ()
virtual void enableBroadcast (bool on)
virtual bool enableLoopback ()
virtual void enableLoopback (bool on)
virtual NetAddress getLocalAddress ()
virtual bool isOpen ()
virtual void joinGroup (const asio::ip::address &address)
virtual void leaveGroup (const asio::ip::address &address)
virtual int multicastHops ()
virtual void multicastHops (int hops)
virtual void open (const NetAddress &a)
virtual void open ()
virtual size_t receive (char *data, size_t length, NetAddress &remote)
virtual size_t receive (char *data, size_t length)
virtual bool reuseAddress ()
virtual void reuseAddress (bool on)
virtual void send (const char *data, size_t length, const NetAddress &remote)
virtual void send (const char *data, size_t length)
virtual void setAsync (bool async)
 Tcp (asio::io_service &service, const NetAddress &a)
virtual ~Tcp ()

Protected Member Functions

void add (ConnectionPtr connection)
void handleAccept (ConnectionPtr connection, const asio::error_code &error)
void handleConnect (const asio::error_code &error)
void handleRead (const asio::error_code &error, size_t count)
void handleSend (const asio::error_code &error, size_t count)
void remove (const NetAddress &address)
 Tcp (asio::io_service &service)

Private Types

typedef std::map< NetAddress,
ConnectionPtr
ConnectionMap
typedef boost::shared_ptr
< Connection
ConnectionPtr

Private Attributes

asio::ip::tcp::acceptor acceptor
ConnectionMap connections
asio::ip::tcp::endpoint endpoint
boost::mutex mutex
bool opened
asio::ip::tcp::endpoint remoteEndpoint
asio::io_serviceservice
asio::ip::tcp::socket socket

Detailed Description

Definition at line 16 of file Tcp.h.


Member Typedef Documentation

Definition at line 54 of file Tcp.h.

typedef boost::shared_ptr<Connection> castor::net::channels::Tcp::ConnectionPtr [private]

Definition at line 53 of file Tcp.h.


Constructor & Destructor Documentation

castor::net::channels::Tcp::Tcp ( asio::io_service service  )  [protected]

Definition at line 105 of file Tcp.cpp.

castor::net::channels::Tcp::Tcp ( asio::io_service service,
const NetAddress a 
)

Definition at line 111 of file Tcp.cpp.

castor::net::channels::Tcp::~Tcp (  )  [virtual]

Definition at line 118 of file Tcp.cpp.


Member Function Documentation

void castor::net::channels::Tcp::accept (  )  throw (NetException) [virtual]

Implements castor::net::CastorChannel.

Definition at line 228 of file Tcp.cpp.

void castor::net::channels::Tcp::add ( ConnectionPtr  connection  )  [protected]

Definition at line 132 of file Tcp.cpp.

void castor::net::channels::Tcp::bind (  )  [virtual]

Implements castor::net::CastorChannel.

Definition at line 178 of file Tcp.cpp.

void castor::net::channels::Tcp::close ( const NetAddress address  )  throw (NetException) [virtual]

Implements castor::net::CastorChannel.

Definition at line 286 of file Tcp.cpp.

void castor::net::channels::Tcp::close (  )  throw (NetException) [virtual]

Implements castor::net::CastorChannel.

Definition at line 260 of file Tcp.cpp.

void castor::net::channels::Tcp::connect (  )  throw (NetException) [virtual]

Implements castor::net::CastorChannel.

Definition at line 250 of file Tcp.cpp.

bool castor::net::channels::Tcp::enableBroadcast (  )  [virtual]

Implements castor::net::CastorChannel.

Definition at line 211 of file Tcp.cpp.

void castor::net::channels::Tcp::enableBroadcast ( bool  on  )  [virtual]

Implements castor::net::CastorChannel.

Definition at line 208 of file Tcp.cpp.

bool castor::net::channels::Tcp::enableLoopback (  )  [virtual]

Implements castor::net::CastorChannel.

Definition at line 204 of file Tcp.cpp.

void castor::net::channels::Tcp::enableLoopback ( bool  on  )  [virtual]

Implements castor::net::CastorChannel.

Definition at line 201 of file Tcp.cpp.

NetAddress castor::net::channels::Tcp::getLocalAddress (  )  [virtual]

Implements castor::net::CastorChannel.

Definition at line 154 of file Tcp.cpp.

void castor::net::channels::Tcp::handleAccept ( ConnectionPtr  connection,
const asio::error_code error 
) [protected]

Definition at line 383 of file Tcp.cpp.

void castor::net::channels::Tcp::handleConnect ( const asio::error_code error  )  [protected]

Definition at line 406 of file Tcp.cpp.

void castor::net::channels::Tcp::handleRead ( const asio::error_code error,
size_t  count 
) [protected]

Definition at line 443 of file Tcp.cpp.

void castor::net::channels::Tcp::handleSend ( const asio::error_code error,
size_t  count 
) [protected]

Definition at line 436 of file Tcp.cpp.

bool castor::net::channels::Tcp::isOpen (  )  [virtual]

Implements castor::net::CastorChannel.

Definition at line 295 of file Tcp.cpp.

void castor::net::channels::Tcp::joinGroup ( const asio::ip::address address  )  [virtual]

Implements castor::net::CastorChannel.

Definition at line 222 of file Tcp.cpp.

void castor::net::channels::Tcp::leaveGroup ( const asio::ip::address address  )  [virtual]

Implements castor::net::CastorChannel.

Definition at line 225 of file Tcp.cpp.

int castor::net::channels::Tcp::multicastHops (  )  [virtual]

Implements castor::net::CastorChannel.

Definition at line 218 of file Tcp.cpp.

void castor::net::channels::Tcp::multicastHops ( int  hops  )  [virtual]

Implements castor::net::CastorChannel.

Definition at line 215 of file Tcp.cpp.

void castor::net::channels::Tcp::open ( const NetAddress a  )  [virtual]

Implements castor::net::CastorChannel.

Definition at line 174 of file Tcp.cpp.

void castor::net::channels::Tcp::open (  )  [virtual]

Implements castor::net::CastorChannel.

Definition at line 170 of file Tcp.cpp.

size_t castor::net::channels::Tcp::receive ( char *  data,
size_t  length,
NetAddress remote 
) [virtual]

Implements castor::net::CastorChannel.

Definition at line 317 of file Tcp.cpp.

size_t castor::net::channels::Tcp::receive ( char *  data,
size_t  length 
) [virtual]

Implements castor::net::CastorChannel.

Definition at line 308 of file Tcp.cpp.

void castor::net::channels::Tcp::remove ( const NetAddress address  )  [protected]

Definition at line 143 of file Tcp.cpp.

bool castor::net::channels::Tcp::reuseAddress (  )  [virtual]

Implements castor::net::CastorChannel.

Definition at line 191 of file Tcp.cpp.

void castor::net::channels::Tcp::reuseAddress ( bool  on  )  [virtual]

Implements castor::net::CastorChannel.

Definition at line 182 of file Tcp.cpp.

void castor::net::channels::Tcp::send ( const char *  data,
size_t  length,
const NetAddress remote 
) [virtual]

Implements castor::net::CastorChannel.

Definition at line 343 of file Tcp.cpp.

void castor::net::channels::Tcp::send ( const char *  data,
size_t  length 
) [virtual]

Implements castor::net::CastorChannel.

Definition at line 327 of file Tcp.cpp.

void castor::net::channels::Tcp::setAsync ( bool  async  )  [virtual]

Implements castor::net::CastorChannel.

Definition at line 121 of file Tcp.cpp.


Member Data Documentation

Definition at line 60 of file Tcp.h.

Definition at line 56 of file Tcp.h.

Definition at line 63 of file Tcp.h.

boost::mutex castor::net::channels::Tcp::mutex [private]

Definition at line 66 of file Tcp.h.

Definition at line 68 of file Tcp.h.

Definition at line 64 of file Tcp.h.

Reimplemented from castor::net::CastorChannel.

Definition at line 58 of file Tcp.h.

Definition at line 61 of file Tcp.h.


The documentation for this class was generated from the following files:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines


Castor
Author(s): Carpe Noctem
autogenerated on Fri Mar 1 14:41:52 2013