Archived
This forum has been archived. Please start a new discussion on GitHub.
about sessionmanager
I want to reach that:
a userid is A, he create a session
then a userid is also A,but from another host, also want to create a session
and now I want to destory the first session
how can i get that
I don't know how to find the first session
please help me
so thank you
a userid is A, he create a session
then a userid is also A,but from another host, also want to create a session
and now I want to destory the first session
how can i get that
I don't know how to find the first session
please help me
so thank you
0
Comments
-
does ice have the "sessionmanager" class?
is it the "AdminSessionManagerI"?0 -
I want to reach that:
a userid is A, he create a session
then a userid is also A,but from another host, also want to create a session
and now I want to destory the first session
how can i get that
I don't know how to find the first session
please help me
so thank you
Are you talking about something specific here, such as a Glacier2 session, or something in your implementation?0 -
chanchanyuan wrote: »does ice have the "sessionmanager" class?
is it the "AdminSessionManagerI"?
I'm not sure what you mean. Glacier2 has a session API. You can look at the Glacier2 demos to see how that works. If that isn't what you are looking for we have a session demo demo/Ice/session. If that doesn't help, then please provide some more information.0 -
so thanks for your replys
I was trying the demo in \Ice-3.3.1\demopy\Glacier2\callback
and there is a server called SessionServer.py
in it, a class:
class DummyPermissionsVerifierI(Glacier2.PermissionsVerifier):
def checkPermissions(self, userId, password, current=None):
........
And in the Function checkPermissions
I want to check the "userId" is has created a session
if so , to destory the previous session
so thanks
your help0 -
so thanks for your replys
I was trying the demo in \Ice-3.3.1\demopy\Glacier2\callback
and there is a server called SessionServer.py
in it, a class:
class DummyPermissionsVerifierI(Glacier2.PermissionsVerifier):
def checkPermissions(self, userId, password, current=None):
........
And in the Function checkPermissions
I want to check the "userId" is has created a session
if so , to destory the previous session
so thanks
your help
Also u can find more userful ideas from the Chat Demo.0 -
thanks your reply
I have read the Demo Chat before this topic
but it destorys session from the client
so I didn't get inspiration from it0 -
Hi Yu,
If you look and ChatDemo SessionManager implementation you will find that here we first call_chatRoom->reserve(vname);
This method ensure that the user id is not being used, you could do some thing similar but instead of reserve the nick, close any session associated to that nick.
so your implementation should check if there is already a session associated with this user and if exists call destroy on the session.
Let us know if you need more help with that.
Regards,
José0 -
so thanks for your reply
ye, you know what I want to do
but the in the example :Ice-3.3.1\demo\Glacier2\chat
I can't find the
Code:
_chatRoom->reserve(vname);
I think I'll solute the problem if I got the example that you said
so wish that you can send the example to me:p
email: luis12yu@gmail.com
thank you0 -
so thank you everybody
I got it
so thanks:D0