Giter Site home page Giter Site logo

Support for jsRocket about rocket HOT 7 CLOSED

helgrima avatar helgrima commented on July 22, 2024
Support for jsRocket

from rocket.

Comments (7)

emoon avatar emoon commented on July 22, 2024

Hi you can try this latest version here https://dl.dropboxusercontent.com/u/5205843/RocketEditor1.2beta-Win.zip

If jsRocket would use the exact same network code to talk to the RocketEditor it should work just fine. I would assume there something extra that needs to be taken into account when talking to the WebSocket and that is why it doesn't work?

from rocket.

helgrima avatar helgrima commented on July 22, 2024

It seems that version 1.2beta does not work either. And I am quite sure you are right about that talking to WebSocket is somehow different. I downloaded this example http://patp.at/xmas/, written by mog, same person who wrote jsRocket, and seems that it is not working either. Maybe I should contact mog for further information.

EDIT
Now I realized that there is precompiled binaries for original rocket editor and it is shipped with Qt5WebSockets.dll. So there must be something different in WebSockets that in normal sockets. But still I have no luck with this either, although it gives me different error message: failed: Connection closed before receiving a handshake response

But I am going to leave this issue open as request for js support.

from rocket.

emoon avatar emoon commented on July 22, 2024

Ok. It might be that you need to "talk" some extra with WebSockets (ie doing some handshake) in order for it to work. I don't think it would be hard to add but:

  1. In order for it to work I would need to know the exact steps so I can tell the different when connecting to a regular socket.

  2. Related to 1 I don't think that the sync lib has some versioning so it might need that it needs to be updated to support this in a good way. I'm not sure though.

If you are able to figure out the exact steps I would need to take in order to get this to work I would be happy to look into it and also if you know a good way I could test this in an easy fashion.

from rocket.

helgrima avatar helgrima commented on July 22, 2024

Using this piece of python software(https://docs.python.org/2/library/socketserver.html#socketserver-tcpserver-example) I realized that WebSocket is quite different than normal socket.

This is example running python software and basic_example.exe provided RocketEditor:
127.0.0.1 wrote:
hello, synctracker!

And here is example running python software and jsRocket:
127.0.0.1 wrote:
GET / HTTP/1.1
Host: localhost:1338
Connection: Upgrade
Pragma: no-cache
Cache-Control: no-cache
Upgrade: websocket
Origin: http://localhost:8000
Sec-WebSocket-Version: 13
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/54.0.2840.99 Safari/537.36
Accept-Encoding: gzip, deflate, sdch, br
Accept-Language: en-US,en;q=0.8,fi;q=0.6
Cookie: .AspNetCore.Antiforgery.6MH6-wyOb4k=CfDJ8N2YzDDOIMZEhvw0B14lowJbHNiJ16ddBKG3bL0rxsii0BuCdCmBVu6FP-hXFkHiA2NwxA0nHnWR-2o4jPoetpqEEcnS27VNOTJHYqeexLAyufw2wGsYWVP_vDv2v3EobS9swIKac3RWlrgdptIZSrE; CP.mode=B; size=4
Sec-WebSocket-Key: gcgq0V69S1CVoWIc80RGRg==
Sec-WebSocket-Extensions: permessage-deflate; client_max_window_bits

That must be the handshaking, which for me looks similar to HTTP request. Maybe RocketEditor should response to that message in some way that WebSocket understands and after that normal socket communication can go on. That is what I think.

from rocket.

emoon avatar emoon commented on July 22, 2024

Yeah I'm pretty sure it would get confused with something like that as it isn't expected. One would have to look at exactly what would be needed to support that then.

from rocket.

helgrima avatar helgrima commented on July 22, 2024

I am under impression that original rocket editor is using Qt WebSocket library. Is using third party libraries in your project suitable? Of course I could give it a shot and try to implement it, but I have no time until next year.

from rocket.

emoon avatar emoon commented on July 22, 2024

Using a third party library is ok as long as it's in C and not too bloated. There is a bunch of them here already https://github.com/emoon/rocket/tree/master/external that I use. It would be great if you could give it a shot :)

from rocket.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.