castor::net::channels::Tcp Class Reference
#include <Tcp.h>
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_service * | service |
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.
Definition at line 53 of file Tcp.h.
Constructor & Destructor Documentation
castor::net::channels::Tcp::~Tcp |
( |
|
) |
[virtual] |
Member Function Documentation
void castor::net::channels::Tcp::accept |
( |
|
) |
throw (NetException) [virtual] |
void castor::net::channels::Tcp::add |
( |
ConnectionPtr |
connection |
) |
[protected] |
void castor::net::channels::Tcp::bind |
( |
|
) |
[virtual] |
void castor::net::channels::Tcp::close |
( |
|
) |
throw (NetException) [virtual] |
void castor::net::channels::Tcp::connect |
( |
|
) |
throw (NetException) [virtual] |
bool castor::net::channels::Tcp::enableBroadcast |
( |
|
) |
[virtual] |
void castor::net::channels::Tcp::enableBroadcast |
( |
bool |
on |
) |
[virtual] |
bool castor::net::channels::Tcp::enableLoopback |
( |
|
) |
[virtual] |
void castor::net::channels::Tcp::enableLoopback |
( |
bool |
on |
) |
[virtual] |
NetAddress castor::net::channels::Tcp::getLocalAddress |
( |
|
) |
[virtual] |
void castor::net::channels::Tcp::handleConnect |
( |
const asio::error_code & |
error |
) |
[protected] |
void castor::net::channels::Tcp::handleRead |
( |
const asio::error_code & |
error, |
|
|
size_t |
count | |
|
) |
| | [protected] |
void castor::net::channels::Tcp::handleSend |
( |
const asio::error_code & |
error, |
|
|
size_t |
count | |
|
) |
| | [protected] |
bool castor::net::channels::Tcp::isOpen |
( |
|
) |
[virtual] |
void castor::net::channels::Tcp::joinGroup |
( |
const asio::ip::address & |
address |
) |
[virtual] |
void castor::net::channels::Tcp::leaveGroup |
( |
const asio::ip::address & |
address |
) |
[virtual] |
int castor::net::channels::Tcp::multicastHops |
( |
|
) |
[virtual] |
void castor::net::channels::Tcp::multicastHops |
( |
int |
hops |
) |
[virtual] |
void castor::net::channels::Tcp::open |
( |
const NetAddress & |
a |
) |
[virtual] |
void castor::net::channels::Tcp::open |
( |
|
) |
[virtual] |
size_t castor::net::channels::Tcp::receive |
( |
char * |
data, |
|
|
size_t |
length, |
|
|
NetAddress & |
remote | |
|
) |
| | [virtual] |
size_t castor::net::channels::Tcp::receive |
( |
char * |
data, |
|
|
size_t |
length | |
|
) |
| | [virtual] |
void castor::net::channels::Tcp::remove |
( |
const NetAddress & |
address |
) |
[protected] |
bool castor::net::channels::Tcp::reuseAddress |
( |
|
) |
[virtual] |
void castor::net::channels::Tcp::reuseAddress |
( |
bool |
on |
) |
[virtual] |
void castor::net::channels::Tcp::send |
( |
const char * |
data, |
|
|
size_t |
length, |
|
|
const NetAddress & |
remote | |
|
) |
| | [virtual] |
void castor::net::channels::Tcp::send |
( |
const char * |
data, |
|
|
size_t |
length | |
|
) |
| | [virtual] |
void castor::net::channels::Tcp::setAsync |
( |
bool |
async |
) |
[virtual] |
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.
Definition at line 66 of file Tcp.h.
Definition at line 68 of file Tcp.h.
Definition at line 64 of file Tcp.h.
Definition at line 61 of file Tcp.h.
The documentation for this class was generated from the following files: