jabberd14  1.6.2
Public Member Functions
xmppd::proxy65::connected_sockets Class Reference

connects two sockets to each other More...

#include <proxy65.h>

Public Member Functions

 connected_sockets (socks5stub *socket1, socks5stub *socket2, const std::string &identifier)
 ~connected_sockets ()
sigc::signal< void,
connected_sockets * > & 
event_closed ()
size_t get_forwarded_traffic ()
const std::string & get_identifier ()

Detailed Description

connects two sockets to each other


Constructor & Destructor Documentation

xmppd::proxy65::connected_sockets::connected_sockets ( socks5stub socket1,
socks5stub socket2,
const std::string &  identifier 
)

create a new instance by connecting two sockets

  • The passed sockets (socket1 and socket2) get deleted by this constructor if no exception is thrown.
  • The two sockets need to have a connection
Parameters:
socket1the one socket that gets connected
socket2the other socket that gets connected
identifieran identifier for this connection (this identifier can later be requested with get_identifier())

References log_debug2, LOGT_IO, mio_reset(), and mio_write().

destruct an instance of connected sockets, this will also close the connection if it is still present


Member Function Documentation

event that signals that the connection has been closed

a pointer to the instance that has been closed gets passed with the event

get the amount of traffic that has been forwarded already

Returns:
the traffic in bytes
const std::string& xmppd::proxy65::connected_sockets::get_identifier ( ) [inline]

get the identifier for this connection

Returns:
the identifier of the connection

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