void Server::sendStateToConnection(Connection::Ptr const& connection) { BOOST_FOREACH(Connection::Ptr const& conn, connectionPool_) { connection->send(Message<MessageType::updateReadiness>( {conn->id(), conn->ready()} )); }
int UTPSocket::send(const bt::Uint8* buf, int len) { Connection::Ptr ptr = conn.toStrongRef(); if (!ptr) return -1; try { return ptr->send(buf, len); } catch (Connection::TransmissionError & err) { close(); return -1; } }