本文整理汇总了C++中ConnectionPtr::_setDescription方法的典型用法代码示例。如果您正苦于以下问题:C++ ConnectionPtr::_setDescription方法的具体用法?C++ ConnectionPtr::_setDescription怎么用?C++ ConnectionPtr::_setDescription使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ConnectionPtr
的用法示例。
在下文中一共展示了ConnectionPtr::_setDescription方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: create
ConnectionPtr Connection::create( ConnectionDescriptionPtr description )
{
ConnectionPtr connection;
switch( description->type )
{
case CONNECTIONTYPE_TCPIP:
case CONNECTIONTYPE_SDP:
connection = new SocketConnection( description->type );
break;
case CONNECTIONTYPE_PIPE:
connection = new PipeConnection;
break;
#ifdef _WIN32
case CONNECTIONTYPE_NAMEDPIPE:
connection = new NamedPipeConnection;
break;
#endif
#ifdef EQ_INFINIBAND
case CONNECTIONTYPE_IB:
connection = new IBConnection;
break;
#endif
case CONNECTIONTYPE_RSP:
connection = new RSPConnection;
break;
#ifdef CO_USE_OFED
case CONNECTIONTYPE_RDMA:
connection = new RDMAConnection;
break;
#endif
#ifdef CO_USE_UDT
case CONNECTIONTYPE_UDT:
connection = new UDTConnection;
break;
#endif
default:
LBWARN << "Connection type " << description->type
<< " not supported" << std::endl;
return 0;
}
if( description->bandwidth == 0 )
description->bandwidth = connection->getDescription()->bandwidth;
connection->_setDescription( description );
return connection;
}