示例#1
0
      if not self._transport:
         raise exception.TransportLost()

      request = util.id()

      d = self._create_future()
      self._unregister_reqs[request] = (d, registration)

      msg = message.Unregister(request, registration.id)

      self._transport.send(msg)
      return d



IPublisher.register(ApplicationSession)
ISubscriber.register(ApplicationSession)
ICaller.register(ApplicationSession)
#ICallee.register(ApplicationSession) ## FIXME: ".register" collides with the ABC "register" method
ITransportHandler.register(ApplicationSession)



class ApplicationSessionFactory:
   """
   WAMP endpoint session factory.
   """

   session = ApplicationSession
   """
   WAMP application session class to be used in this factory.
示例#2
0
      if not self._transport:
         raise exception.TransportLost()

      request = util.id()

      d = self._create_future()
      self._unregister_reqs[request] = (d, registration)

      msg = message.Unregister(request, registration.id)

      self._transport.send(msg)
      return d



IPublisher.register(ApplicationSession)
ISubscriber.register(ApplicationSession)
ICaller.register(ApplicationSession)
#ICallee.register(ApplicationSession) ## FIXME: ".register" collides with the ABC "register" method
ITransportHandler.register(ApplicationSession)



class ApplicationSessionFactory:
   """
   WAMP endpoint session factory.
   """

   session = ApplicationSession
   """
   WAMP application session class to be used in this factory.