getting the information that any session has closed

#1

Hy,

Is there a way in a guest program to get the information that a session opened by another program has closed ?

The idea is to be able to do some cleanup in the data of the guest program…

0 Likes

#2

Rejo,

Yes I think this is new but implemented. Try like below:

@wamp.subscribe('wamp.session.on_join')
def on_join(self, args, kwargs):
    print("WAMP meta event on_join received", args, kwargs)

@wamp.subscribe('wamp.session.on_leave')
def on_leave(self, args, kwargs):
    print("WAMP meta event on_leave received", args, kwargs)
0 Likes

#3

Thanks Dave.

That’s exactly what I was looking for :slight_smile:

···

On Monday, April 27, 2015 at 9:52:01 PM UTC+2, Dave Thomas wrote:

Rejo,

Yes I think this is new but implemented. Try like below:

@wamp.subscribe('wamp.session.on_join')
def on_join(self, args, kwargs):
    print("WAMP meta event on_join received", args, kwargs)

@wamp.subscribe('wamp.session.on_leave')
def on_leave(self, args, kwargs):
    print("WAMP meta event on_leave received", args, kwargs)
0 Likes