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
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
I added two methods:
Teapot>>WS: patternActionAssoc
self
addRouteMethod: (TeaMethodMatcher exactly: #GET)
pattern: patternActionAssoc key
action: (ZnWebSocketDelegate map: patternActionAssoc key to:
patternActionAssoc value)
ZnWebSocketDeleg
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
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
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
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