Attila Magyar wrote
> Teapot already supports conditional routes, maybe using them instead of
> adding the WS: message would be better.
> 
> I'm thinking domething like:
> 
> Teapot on 
>     GET: '/chat' -> whatever; when: [:req | req isWebSocket];
>     start.
> 
> or just
> 
> Teapot on 
>     GET: '/chat' -> whatever; when: #isWebSocket
>     start.
> 
> I'll play with this idea sometime.
> 
> 
> 
> --
> Sent from: http://forum.world.st/Pharo-Smalltalk-Users-f1310670.html

I've played a little bit with  this:

GET: '/chat' -> [:req  | Teapot forward: aReq toWebSocket: '/chat' ]; when:
...

The class method of Teapot does the "ZnWebSocketDelegate map: ... to... "
thing. It could handle the instances of the delegate per url. Don't know it
this matches the Teapot philosophy, it was just another variant to play
with.

Cheers

Hans



--
Sent from: http://forum.world.st/Pharo-Smalltalk-Users-f1310670.html

Reply via email to