rejetto forum
Software => HFS ~ HTTP File Server => Topic started by: username1565 on October 23, 2019, 01:14:52 AM
-
Is there any ability for HFS to working with WEBSOCKETS?
I cann't found keyword "websockets" on this forum.
Can you realize this ability? In this case, users can chat with server, using only one connection,
and no need to send many XHR-queries and open many connections.
I have Websocket server, writted on c# here: https://github.com/username1565/Fleck2
See source code, and this issue: https://github.com/username1565/Fleck2/issues/1
For introduction, and test this, if you still have not work with Websockets.
Have a nice day!
-
hi, websockets are nice, but hfs is missing much more basic features, considering its file-server nature :)
-
@1565
You can convert your websockets server as a proxy to translate request to hfs with some spécial section
-
@1565
You can convert your websockets server as a proxy to translate request to hfs with some spécial section
Ok. Good. But I think, will be better to you can realize this as separate internal module.
For example, to do live updating the dynamic data, or chat, or show the stats about downloading on the webpage,
will be better to keep one connection with client,
and do not accept from this client many connections, after sending each query on the server,
which will be closed by client, after receive response.
But if you offer to open many connections on the proxy, then this websocket-connection have no any sence,
and server loading still not will be lower. ;D
hi, websockets are nice, but hfs is missing much more basic features, considering its file-server nature :)
I just leaved it here, because if you have free time, you can just for fun, see the documentation, about how it works,
and see that source code, about how to implement it, up to .NET Framework 2.0,
and maybe, using this code, you can implement this too, but on Objective Pascal, and more easy.
Cheers!
-
may be with ubuntu wine and some iptable/ firewall commands.
-
my attempt at building HFS 3 included websockets, with real-time refreshing of the file list :)
https://github.com/rejetto/hfs
sadly i don't have currently time to bring on that project
-
you can use Server-sent events (https://developer.mozilla.org/en-US/docs/Web/API/Server-sent_events)
I've used it last in Video player to watch with friends (http://rejetto.com/forum/index.php?topic=13173.0) and earlier in my Chat application
-
SSE is interesting for cases when it's hard to get websockets.
At work we created something very similar 1 year ago, not knowing this standard, otherwise we would have followed it.
Pity Edge doesn't support it.
-
Edge79 (is being rolled out. I don't have it yet) supports (https://caniuse.com/#feat=eventsource) it
in my aforementioned apps I fallback to polling if not supported
-
and it seems it can be polyfilled
https://www.npmjs.com/package/event-source-polyfill