Wraps a TCP socket that is used for one part of bi-directional communication. More...
Public Member Functions | |
CommSocket (CommMode mode, SocketAddress targetAddress, SocketPort targetPort) | |
CommSocket (CommMode mode, Socket &socket) | |
~CommSocket () | |
SocketAddress | address () const |
SocketPort | port () const |
SocketAddress | remoteAddress () const |
SocketPort | remotePort () const |
CommMode | mode () const |
bool | connected () const |
void | disconnect () |
bool | keepAlive () const |
void | setKeepAlive (bool value) |
void | update () |
void | send (const void *buffer, std::size_t size) |
void | sendPendingData () |
std::size_t | pendingBytes () const |
Public Attributes | |
std::tr1::function< void(const void *, std::size_t)> | onReceive |
std::tr1::function< void()> | onDisconnection |
Wraps a TCP socket that is used for one part of bi-directional communication.
Definition at line 91 of file Sockets.hpp.
Gosu::CommSocket::CommSocket | ( | CommMode | mode, |
SocketAddress | targetAddress, | ||
SocketPort | targetPort | ||
) |
Gosu::CommSocket::CommSocket | ( | CommMode | mode, |
Socket & | socket | ||
) |
Gosu::CommSocket::~CommSocket | ( | ) |
SocketAddress Gosu::CommSocket::address | ( | ) | const |
bool Gosu::CommSocket::connected | ( | ) | const |
void Gosu::CommSocket::disconnect | ( | ) |
bool Gosu::CommSocket::keepAlive | ( | ) | const |
CommMode Gosu::CommSocket::mode | ( | ) | const |
std::size_t Gosu::CommSocket::pendingBytes | ( | ) | const |
SocketPort Gosu::CommSocket::port | ( | ) | const |
SocketAddress Gosu::CommSocket::remoteAddress | ( | ) | const |
SocketPort Gosu::CommSocket::remotePort | ( | ) | const |
void Gosu::CommSocket::send | ( | const void * | buffer, |
std::size_t | size | ||
) |
void Gosu::CommSocket::sendPendingData | ( | ) |
void Gosu::CommSocket::setKeepAlive | ( | bool | value | ) |
void Gosu::CommSocket::update | ( | ) |
std::tr1::function<void ()> Gosu::CommSocket::onDisconnection |
Definition at line 125 of file Sockets.hpp.
std::tr1::function<void (const void*, std::size_t)> Gosu::CommSocket::onReceive |
Definition at line 124 of file Sockets.hpp.