All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines
Public Member Functions | Public Attributes | Protected Types | Protected Member Functions | Static Protected Member Functions | Protected Attributes | Friends
castor::net::CastorChannel Class Reference

#include <CastorChannel.h>

Inheritance diagram for castor::net::CastorChannel:
Inheritance graph
[legend]

List of all members.

Public Member Functions

virtual void accept ()=0 throw (NetException)
virtual void bind ()=0
 CastorChannel (const CastorChannel &other)
virtual void close ()=0 throw (NetException)
virtual void close (const NetAddress &address)=0 throw (NetException)
virtual void connect ()=0 throw (NetException)
virtual void enableBroadcast (bool on)=0
virtual bool enableBroadcast ()=0
virtual void enableLoopback (bool on)=0
virtual bool enableLoopback ()=0
NetAddressgetAddress ()
asio::mutable_buffers_1 getBuffer ()
asio::io_servicegetIoService ()
virtual NetAddress getLocalAddress ()=0
bool isAsync ()
virtual bool isOpen ()=0
void join ()
virtual void joinGroup (const asio::ip::address &address)=0
virtual void leaveGroup (const asio::ip::address &address)=0
virtual void multicastHops (int hops)=0
virtual int multicastHops ()=0
virtual void open ()=0
virtual void open (const NetAddress &a)=0
virtual size_t receive (char *data, size_t length)=0
virtual size_t receive (char *data, size_t length, NetAddress &remote)=0
void registerCallback (CCallbackPtr cb)
virtual void reuseAddress (bool on)=0
virtual bool reuseAddress ()=0
void run ()
virtual void send (const char *data, size_t length)=0
virtual void send (const char *data, size_t length, const NetAddress &remote)=0
virtual void setAsync (bool value)=0
void start ()
virtual ~CastorChannel ()

Public Attributes

CastorChannelCallback callback
CastorChannelExtCallback callbackExt
Event connectionEstablished
Event connectionLost
Event peerAdded
Event peerRemoved

Protected Types

enum  { mode_undefined, mode_accept, mode_connect }
typedef std::set< NetAddressAddressSet
typedef std::map< std::string,
NetInterfacePtr
InterfaceMap
typedef boost::shared_ptr
< asio::thread
ThreadType

Protected Member Functions

 CastorChannel (asio::io_service &service)
void getIfaddrs ()
void signalReceive (const char *buffer, size_t count, NetAddressPtr address)

Static Protected Member Functions

static CastorChannelPtr create (asio::io_service &service, const std::string spec) throw (NetException)
static CastorChannelPtr create (asio::io_service &service, const NetAddress &address) throw (NetException)

Protected Attributes

NetAddress address
bool async
char buffer [8192]
CCallbackPtr cb
bool closed
InterfaceMap interfaces
AddressSet localAddresses
enum
castor::net::CastorChannel:: { ... }  
mode
asio::io_serviceservice
asio::io_service::strand strand
ThreadType thread

Friends

class Communication

Detailed Description

Definition at line 47 of file CastorChannel.h.


Member Typedef Documentation

Definition at line 84 of file CastorChannel.h.

typedef std::map<std::string, NetInterfacePtr> castor::net::CastorChannel::InterfaceMap [protected]

Definition at line 83 of file CastorChannel.h.

typedef boost::shared_ptr<asio::thread> castor::net::CastorChannel::ThreadType [protected]

Definition at line 55 of file CastorChannel.h.


Member Enumeration Documentation

anonymous enum [protected]
Enumerator:
mode_undefined 
mode_accept 
mode_connect 

Definition at line 74 of file CastorChannel.h.


Constructor & Destructor Documentation

Definition at line 8 of file CastorChannel.cpp.

Definition at line 17 of file CastorChannel.cpp.

Definition at line 29 of file CastorChannel.cpp.


Member Function Documentation

virtual void castor::net::CastorChannel::accept ( ) throw (NetException) [pure virtual]
virtual void castor::net::CastorChannel::bind ( ) [pure virtual]
virtual void castor::net::CastorChannel::close ( ) throw (NetException) [pure virtual]
virtual void castor::net::CastorChannel::close ( const NetAddress address) throw (NetException) [pure virtual]
virtual void castor::net::CastorChannel::connect ( ) throw (NetException) [pure virtual]
CastorChannelPtr castor::net::CastorChannel::create ( asio::io_service service,
const std::string  spec 
) throw (NetException) [static, protected]

Definition at line 76 of file CastorChannel.cpp.

CastorChannelPtr castor::net::CastorChannel::create ( asio::io_service service,
const NetAddress address 
) throw (NetException) [static, protected]

Definition at line 83 of file CastorChannel.cpp.

virtual void castor::net::CastorChannel::enableBroadcast ( bool  on) [pure virtual]
virtual bool castor::net::CastorChannel::enableBroadcast ( ) [pure virtual]
virtual void castor::net::CastorChannel::enableLoopback ( bool  on) [pure virtual]
virtual bool castor::net::CastorChannel::enableLoopback ( ) [pure virtual]

Definition at line 136 of file CastorChannel.cpp.

Definition at line 99 of file CastorChannel.cpp.

Definition at line 32 of file CastorChannel.cpp.

Definition at line 105 of file CastorChannel.cpp.

Definition at line 122 of file CastorChannel.h.

virtual bool castor::net::CastorChannel::isOpen ( ) [pure virtual]

Definition at line 126 of file CastorChannel.cpp.

virtual void castor::net::CastorChannel::joinGroup ( const asio::ip::address address) [pure virtual]
virtual void castor::net::CastorChannel::leaveGroup ( const asio::ip::address address) [pure virtual]
virtual void castor::net::CastorChannel::multicastHops ( int  hops) [pure virtual]
virtual int castor::net::CastorChannel::multicastHops ( ) [pure virtual]
virtual void castor::net::CastorChannel::open ( ) [pure virtual]
virtual void castor::net::CastorChannel::open ( const NetAddress a) [pure virtual]
virtual size_t castor::net::CastorChannel::receive ( char *  data,
size_t  length 
) [pure virtual]
virtual size_t castor::net::CastorChannel::receive ( char *  data,
size_t  length,
NetAddress remote 
) [pure virtual]

Definition at line 59 of file CastorChannel.cpp.

virtual void castor::net::CastorChannel::reuseAddress ( bool  on) [pure virtual]
virtual bool castor::net::CastorChannel::reuseAddress ( ) [pure virtual]

Definition at line 115 of file CastorChannel.cpp.

virtual void castor::net::CastorChannel::send ( const char *  data,
size_t  length 
) [pure virtual]
virtual void castor::net::CastorChannel::send ( const char *  data,
size_t  length,
const NetAddress remote 
) [pure virtual]
virtual void castor::net::CastorChannel::setAsync ( bool  value) [pure virtual]
void castor::net::CastorChannel::signalReceive ( const char *  buffer,
size_t  count,
NetAddressPtr  address 
) [inline, protected]

Definition at line 64 of file CastorChannel.h.

Definition at line 109 of file CastorChannel.cpp.


Friends And Related Function Documentation

friend class Communication [friend]

Definition at line 81 of file CastorChannel.h.


Member Data Documentation

Definition at line 51 of file CastorChannel.h.

Definition at line 90 of file CastorChannel.h.

char castor::net::CastorChannel::buffer[8192] [protected]

Definition at line 53 of file CastorChannel.h.

Definition at line 96 of file CastorChannel.h.

Definition at line 97 of file CastorChannel.h.

Definition at line 76 of file CastorChannel.h.

Definition at line 89 of file CastorChannel.h.

Definition at line 103 of file CastorChannel.h.

Definition at line 102 of file CastorChannel.h.

Definition at line 86 of file CastorChannel.h.

Definition at line 87 of file CastorChannel.h.

enum { ... } castor::net::CastorChannel::mode [protected]

Definition at line 99 of file CastorChannel.h.

Definition at line 100 of file CastorChannel.h.

Reimplemented in castor::net::channels::Tcp.

Definition at line 57 of file CastorChannel.h.

Definition at line 58 of file CastorChannel.h.

Definition at line 60 of file CastorChannel.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 Nov 8 2013 11:05:41