void Connection::_setDescription( ConnectionDescriptionPtr description ) { LBASSERT( description.isValid( )); LBASSERTINFO( _impl->description->type == description->type, "Wrong connection type in description" ); _impl->description = description; LBASSERT( description->bandwidth > 0 ); }
void Connection::setDescription( ConnectionDescriptionPtr description ) { EQASSERT( description.isValid( )); EQASSERTINFO( _description->type == description->type, "Wrong connection type in description" ); _description = description; EQASSERT( description->bandwidth > 0 ); }
std::ostream& operator << ( std::ostream& os, const Connection& connection ) { Connection::State state = connection.getState(); ConnectionDescriptionPtr desc = connection.getDescription(); os << "Connection " << (void*)&connection << " type " << typeid( connection ).name() << " state " << ( state == Connection::STATE_CLOSED ? "closed" : state == Connection::STATE_CONNECTING ? "connecting" : state == Connection::STATE_CONNECTED ? "connected" : state == Connection::STATE_LISTENING ? "listening" : state == Connection::STATE_CLOSING ? "closing" : "UNKNOWN" ); if( desc.isValid( )) os << " description " << desc->toString(); return os; }