Sparkle Websockets 'Opaque mode' on Linux

Sparkle on Linux does not seem to implement the server-side WebSocket upgrade (Sparkle on Linux does not implement opaque mode), this complicates real time data pushes over websocket on linux with Sparkle (in fact it breaks it). Is this a feature that will be included or is on the roadmap for the future?

Currently Websockets is only supported on Windows in TMS Sparkle. I'm not sure wha you mean by "opaque mode" though.

Thanks Wagner,

By "opaque mode" I mean Sparkle's own term for the socket take-over that a WebSocket upgrade requires — after the 101 Switching Protocols handshake, the HTTP server has to stop treating the connection as request/response and hand the raw TCP stream to the application so it can do bidirectional WebSocket framing. Sparkle models that as putting the connection/context into "opaque" mode.

The reason I use that word is that it's the literal text of the exception Sparkle raises. On Linux, the cross-platform (Indy) Sparkle server throws at runtime when a WebSocket upgrade is attempted:

ENotImplemented: Opaque mode not supported in TIndyContext

raised from Sparkle.Indy.Context.TIndyContext when calling TWebSocketUpgrader.Upgrade (the same upgrader your WebSocket demo uses). The handshake code compiles fine and the server starts, but every /ws upgrade 500s with that error. There's no config that changes it — it reads as a missing capability in the Indy context, not a setting.

On Windows the identical code works, because the http.sys backend (THttpSysServer) supports the opaque/raw-socket take-over. So the behaviour is specifically: Sparkle WebSocket server works on Windows (http.sys) but not on Linux (Indy context).

That's also why I wanted to double-check your sentence — "WebSockets is only supported on Linux in TMS Sparkle." I think that may be a typo for Windows? That would match what we see (and the TIndyContext error above). If Linux server-side WebSocket is actually supported, I'd love to know which server class to use, because TIndySparkleHTTPServer raises the error above for us.

So my question is really: is implementing opaque mode (the raw-socket take-over for WS upgrades) in TIndyContext on the roadmap, so that Sparkle can serve WebSockets on Linux?

Ok, thanks, sorry for the confusion.

Correct, I have fixed my sentence. Sorry again.

It's something we intend to support, yes, but no timeframe yet.

No problem and thank you for your repsonse.

I will wait for the roadmap to develop.

Hope Linux will be supported as well.

Where can I see what other features are not supported for Linux?
As Sparkle Linux compatible, I supposed that all major features are implemented for supported platforms, otherwise somewhere should be detailed page about limitations, probably some sort of per-platform feature matrix. Same for all other BIZ products.

I believe Websockets is the only major feature only supported on Windows. It's in our backlog to implement it for Linux.