本文整理汇总了C++中SocketPtr::getSocket方法的典型用法代码示例。如果您正苦于以下问题:C++ SocketPtr::getSocket方法的具体用法?C++ SocketPtr::getSocket怎么用?C++ SocketPtr::getSocket使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类SocketPtr
的用法示例。
在下文中一共展示了SocketPtr::getSocket方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: string
//-----------------------------------------------------------------------
String string(const SocketPtr & x)
{
if (!x) return String();
auto socket = x->getSocket();
if (INVALID_SOCKET == socket) return "INVALID_SOCKET";
return string(((PTRNUMBER)(socket)));
}
示例2: delegateGone
//-------------------------------------------------------------------------
void SocketSet::delegateGone(SocketPtr socket)
{
ZS_THROW_BAD_STATE_IF(mPollingSocketsWithDelegateGoneCount >= mPollingCount) // can never grow larger than the polling count
mPollingSocketsWithDelegateGone[mPollingSocketsWithDelegateGoneCount] = socket;
++mPollingSocketsWithDelegateGoneCount;
ZS_LOG_TRACE(log("delegate gone") + ZS_PARAM("handle", socket->getSocket()) + ZS_PARAM("gone count", mPollingSocketsWithDelegateGoneCount))
}
示例3: firedEvent
//-------------------------------------------------------------------------
void SocketSet::firedEvent(
SocketPtr socket,
event_type event
)
{
ZS_THROW_BAD_STATE_IF(mPollingFiredEventCount >= mPollingCount) // can never grow larger than the polling count
mPollingFiredEvents[mPollingFiredEventCount].first = socket;
mPollingFiredEvents[mPollingFiredEventCount].second = event;
++mPollingFiredEventCount;
ZS_LOG_INSANE(log("fire event") + ZS_PARAM("handle", socket->getSocket()) + ZS_PARAM("event", friendly(event)) + ZS_PARAM("fired count", mPollingFiredEventCount))
}