TCP/IP Connection.
More...
#include <Connection.hh>
gazebo::transport::Connection::Connection |
( |
| ) |
|
virtual gazebo::transport::Connection::~Connection |
( |
| ) |
|
|
virtual |
template<typename Handler >
void gazebo::transport::Connection::AsyncRead |
( |
Handler |
handler | ) |
|
|
inline |
void gazebo::transport::Connection::Cancel |
( |
| ) |
|
Cancel all async operations on an open socket.
bool gazebo::transport::Connection::Connect |
( |
const std::string & |
host, |
|
|
unsigned int |
port |
|
) |
| |
Connect to a remote host.
event::ConnectionPtr gazebo::transport::Connection::ConnectToShutdown |
( |
boost::function< void()> |
subscriber_ | ) |
|
|
inline |
void gazebo::transport::Connection::EnqueueMsg |
( |
const std::string & |
_buffer, |
|
|
bool |
_force = false |
|
) |
| |
Write data to the socket.
std::string gazebo::transport::Connection::GetLocalAddress |
( |
| ) |
const |
Get the address of this connection.
std::string gazebo::transport::Connection::GetLocalHostname |
( |
| ) |
const |
unsigned int gazebo::transport::Connection::GetLocalPort |
( |
| ) |
const |
Get the port of this connection.
std::string gazebo::transport::Connection::GetLocalURI |
( |
| ) |
const |
std::string gazebo::transport::Connection::GetRemoteAddress |
( |
| ) |
const |
std::string gazebo::transport::Connection::GetRemoteHostname |
( |
| ) |
const |
unsigned int gazebo::transport::Connection::GetRemotePort |
( |
| ) |
const |
Get the remote port number.
std::string gazebo::transport::Connection::GetRemoteURI |
( |
| ) |
const |
bool gazebo::transport::Connection::IsOpen |
( |
| ) |
const |
Return true if the connection is open.
Referenced by AsyncRead().
void gazebo::transport::Connection::Listen |
( |
unsigned int |
port, |
|
|
const AcceptCallback & |
accept_cb |
|
) |
| |
Start a server that listens on a port.
void gazebo::transport::Connection::ProcessWriteQueue |
( |
| ) |
|
Handle on write callbacks.
bool gazebo::transport::Connection::Read |
( |
std::string & |
data | ) |
|
Read data from the socket.
void gazebo::transport::Connection::Shutdown |
( |
| ) |
|
void gazebo::transport::Connection::StartRead |
( |
const ReadCallback & |
cb | ) |
|
Start a thread that reads from the connection, and passes new message to the ReadCallback.
void gazebo::transport::Connection::StopRead |
( |
| ) |
|
unsigned int gazebo::transport::Connection::id |
unsigned int gazebo::transport::Connection::writeCount |
The documentation for this class was generated from the following file: