Ejemplo n.º 1
0
 //-----------------------------------------------------------------------
 String string(const SocketPtr & x)
 {
   if (!x) return String();
   auto socket = x->getSocket();
   if (INVALID_SOCKET == socket) return "INVALID_SOCKET";
   return string(((PTRNUMBER)(socket)));
 }
Ejemplo n.º 2
0
    //-------------------------------------------------------------------------
    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))
    }
Ejemplo n.º 3
0
    //-------------------------------------------------------------------------
    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))
    }