#1 2014-07-09 15:38:03

warleyalex
Member
From: Sete Lagoas-MG, Brasil
Registered: 2013-01-20
Posts: 250

Websockets with mORMot

Hello, I'd like to create an timer countdown test application which synchronizes server and clients. I'm using sgcWebSockets available D7-XE3 with mORMot project 04, the idea was using mORMot HTTP connections with websockets through
the same port (unfortunately you can not use with the same port sad).
My countdown timer app, the communications are done over the regular TCP/IP. This is really nice, you can see timer syncing on client side. The handshake resembles HTTP.

GET / HTTP/1.1
Host: 127.0.0.1:8081
Upgrade: websocket
Connection: Upgrade
Sec-WebSocket-Key: dF0ZkGwg4lHHkhdpv9Qn3g==
Origin: 127.0.0.1
Sec-WebSocket-Version: 13
------------------------------------------------------
HTTP/1.1 101 Switching Protocols
Upgrade: websocket
Connection: Upgrade
Sec-WebSocket-Accept: czpaDhcUAgRb5LilMYHZIlGxRgg=
---------------------------
%9 Days 23 Hours 59 Minutes 58 Seconds%9 Days 23 Hours 59 Minutes 57 Seconds%9 Days 23 Hours 59 Minutes 56 Seconds%9 Days 23 Hours 59 Minutes 55 Seconds%9 Days 23 Hours 59 Minutes 54 Seconds
---------------------------

It would be really crazy if mORMot could create both Servers and clients Websockets.

Offline

#2 2014-07-09 16:24:58

ab
Administrator
From: France
Registered: 2010-06-21
Posts: 14,655
Website

Re: Websockets with mORMot

It is a long time feature request:
http://blog.synopse.info/post/2012/09/0 … laboration
http://synopse.info/fossil/tktview?name=aa230e5299

But we did not implement it yet.
We simply use pooling from the client side, and it works very well in practice.

Offline

Board footer

Powered by FluxBB