fafhrd91 / pyramid_sockjs

44 stars 13 forks source link

Creating a session with a desired `id` #10

Closed thapar closed 12 years ago

thapar commented 12 years ago

If within your example ( https://github.com/fafhrd91/pyramid_sockjs/blob/master/examples/chat.py ) I wanted to use self.request.user.username to create a session with a particular id, where in that example would that be done? Within the add_sockjs_route(session=ChatSession('here')) or somewhere else (preferrably within the ChatSession class definition itself)?

fafhrd91 commented 12 years ago

client side (sockjs) code provides session id, we cant control this in pyramid_sockjs. but you can create new session class (inherit from ChatSession) and implement custom id in it

thapar commented 12 years ago

Does that mean I have to rename the session id in ChatSession view?