#1 2016-08-25 11:48:46

emk
Member
Registered: 2013-10-24
Posts: 96

Websockets and SSL

I read that because of every SSL handshaking/exchange certificate a http connection with ~200ms will go to finally ~500ms. Using 'synaes' encryption for desktop will be ok, but our future javascript/mobile counter part app will be a little laggy. So, I thought about websockets:

I never used websockets, but I intend to. I see in forum there is a branch of user "mpv" who made possible thousands of websocket connections with few server resources based on "http.sys". Why it's not included in main release/branch? I think this achivement is colosal. I really need this for "SSL lag reason", but also really need for continous connection with mobile apps to send them "pushes".

I also need this websocket connections to be encrypted.
So, in "mpv-branch", websockets connections are encrypted? How? with SSL if certificate is available/enabled for "http.sys"? or must be developed as another standars "wss://" ? Please, someone to bring some light to me because I'm in darkness. Thank you.

Offline

#2 2016-08-25 16:10:35

mpv
Member
From: Ukraine
Registered: 2012-03-24
Posts: 1,571
Website

Re: Websockets and SSL

Yes,  WinWebSocket brunch use a http.sys level encryption, so you can add a certificate in the same way as for https. We test it in production with 5000 ws connections. But this brunch add only a low level THttpApiWebSocketServer = class(THttpApiServer), so not work with mORMot and require a additional modifications

Last edited by mpv (2016-08-25 16:10:52)

Offline

#3 2016-08-25 18:33:21

emk
Member
Registered: 2013-10-24
Posts: 96

Re: Websockets and SSL

1. Any plans to make these http.sys-websockets compatible with TSQLRestServer - for method based server? I want to call ex: "GET /root/Sum?a=3.12&b=4.2" thru a websocket.

2. I see the example from Project31WinHTTPEchoServer.dpr. How can I send from server side a notification message to a specific connection ID? For ex: "CUSTOMERS_updated"

Thank you.

Offline

Board footer

Powered by FluxBB