Re: [Pharo-users] Teapot and Websockets

2017-11-18 Thread Hans
Hi, now I'm playing with a new type of TeaRoute>>TeaWebSocketRoute. It conrains the ZnWebSocketDelegate. And I also use the WS: message. I want to try to setup my Teapot fork to Github with IceBerg. Just an Experiment :) Cheers Hans -- Sent from: http://forum.world.st/Pharo-Smalltalk-Users

Re: [Pharo-users] Teapot and Websockets

2017-10-27 Thread Hans
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 > G

Re: [Pharo-users] Teapot and Websockets

2017-09-08 Thread Georges
I added two methods: Teapot>>WS: patternActionAssoc self addRouteMethod: (TeaMethodMatcher exactly: #GET) pattern: patternActionAssoc key action: (ZnWebSocketDelegate map: patternActionAssoc key to: patternActionAssoc value) ZnWebSocketDeleg

Re: [Pharo-users] Teapot and Websockets

2017-09-07 Thread Attila Magyar
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

Re: [Pharo-users] Teapot and Websockets

2017-09-07 Thread Attila Magyar
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

Re: [Pharo-users] Teapot and Websockets

2017-09-07 Thread Georges
Hello Attila, What I want is to have a Teapot Server running that somehow also can handle websockets :) In the Pharo Enterprise Book there is a chapter about WebSockets. In there are examples how to setup a ZnServer with a ZnWebSocketDelegate, for instance: ZnServer stopDefault. ZnServer startDe

Re: [Pharo-users] Teapot and Websockets

2017-09-07 Thread Attila Magyar
Hi Georges, This is not supported at this moment. If I understand your example correctly then WS: '/ws-chatroom' would match on an incoming WebSocket handshake request and it would create and return new websocket. The same websocket would be passed to the handler block for doing additional setu