Hi Joseph,
Am 30.10.2014 21:09, schrieb Joseph Schorr:
> Hey Tobias,
>
> So I think the problem is that the router in between the server and the
> session is not forwarding the onClose/onLeave calls. Is there a way to
> have a multi-realm server without the router?
Every WAMP based application needs a router. This is the part that lets
app components talk to each other.
A single router can manage many realms.
Whether a router is "a server" depends on whether the router is actually
accepting network connections.
E.g. you can create a WAMP app with a router and all app components
running embedded in the router, and the router not listening on any
network ports at all. In this case I wouldn't call the router "a
server". Essentially, the router in this case only acts internally for
the app, and allows the app to be composed of components, but the
components are not exposed or accesible from outside.
>
> Sorry for all the questions, but the system is quite complex :)
No problem at all - keep on asking;) I am also learning each time ..
what's hard to understand, what people actually want to do, etc.
Cheers,
/Tobias
> class MyComponent(__ApplicationSession):
>
> def onConnect(self):
> print("onConnect")
> self.join(self.config.realm)
>
> def onJoin(self, details):
> print("onJoin: {0}".format(details))
>
> def onLeave(self, details):
> print("onLeave: {0}".format(details))
>
> def onDisconnect(self):
> print("onDisconnect")
>
>
> if __name__ == '__main__':
> from autobahn.asyncio.wamp import ApplicationRunner
>
> runner = ApplicationRunner(url = "ws://
127.0.0.1:8080/ws
> <
http://127.0.0.1:8080/ws>", realm = "realm1")
> runner.run(MyComponent)
>
>
> ===
>
> The lifecycle callbacks of a WAMP session are documented here:
>
>
http://autobahn.ws/python/__reference/autobahn.wamp.html#__autobahn.wamp.interfaces.__ISession
> <
http://autobahn.ws/python/reference/autobahn.wamp.html#autobahn.wamp.interfaces.ISession>
>
> ===
>
> The metaevents mentioned in the reply by Reda are for something
> slightly different: when you want to monitor a _different_
> session from disappearing.
>
> Please let me know if above works for you (the lifecycle stuff) ..
>
> Cheers,
> /Tobias
>
>
> Thanks!
> Joseph Schorr
>
> --
> You received this message because you are subscribed to the
> Google
> Groups "Autobahn" group.
> To unsubscribe from this group and stop receiving emails
> from it, send
> <mailto:
autobahnws%2Bunsu...@googlegroups.com>>.
> To post to this group, send email to
> <mailto:
autob...@googlegroups.com>>.
> To view this discussion on the web visit
> <
https://groups.google.com/d/msgid/autobahnws/ee3fd1af-12e0-4d62-8133-5e647ba9a95c%40googlegroups.com?utm_medium=email&utm_source=footer>>.
> For more options, visit
https://groups.google.com/d/__optout
> <
https://groups.google.com/d/optout>.
>
>
> --
> You received this message because you are subscribed to a topic
> in the Google Groups "Autobahn" group.
> To unsubscribe from this topic, visit
>
https://groups.google.com/d/__topic/autobahnws/HaIWAe-pylk/__unsubscribe
> <
https://groups.google.com/d/topic/autobahnws/HaIWAe-pylk/unsubscribe>.
> To unsubscribe from this group and all its topics, send an email
> to autobahnws+unsubscribe@__
googlegroups.com
> <mailto:
autobahnws%2Bunsu...@googlegroups.com>.
> <mailto:
autob...@googlegroups.com>.
> To view this discussion on the web visit
>
https://groups.google.com/d/__msgid/autobahnws/54501BB4.__70000%40gmail.com
> <
https://groups.google.com/d/msgid/autobahnws/54501BB4.70000%40gmail.com>.
>
> For more options, visit
https://groups.google.com/d/__optout
> <
https://groups.google.com/d/optout>.
>
>
>
> --
> You received this message because you are subscribed to the Google
> Groups "Autobahn" group.
> To unsubscribe from this group and stop receiving emails from it, send
> an email to
autobahnws+...@googlegroups.com
> <mailto:
autobahnws+...@googlegroups.com>.
> <mailto:
autob...@googlegroups.com>.
> To view this discussion on the web visit
>
https://groups.google.com/d/msgid/autobahnws/CAL9hb3ih7RAv67N2Kn8%3DCOhQw4X1PA6FYSe30SAza4_64N%3DMrw%40mail.gmail.com
> <
https://groups.google.com/d/msgid/autobahnws/CAL9hb3ih7RAv67N2Kn8%3DCOhQw4X1PA6FYSe30SAza4_64N%3DMrw%40mail.gmail.com?utm_medium=email&utm_source=footer>.