Giter Site home page Giter Site logo

Comments (6)

mattgodbolt avatar mattgodbolt commented on May 13, 2024

Hi there,

Thanks for the kind words about seasocks. I'd doubt it's your fault here;
my guess is there's a flaw in the seasocks handling of websockets! I've
only ever used it with Chrome and Firefox. I don't have easy access to a
Windows machine for edge but I'll see what I can do!

Do you happen to have wireshark or similar installed? A really handy thing
to have would be a capture of the network traffic to and from seasocks. No
worries if not!

Thanks, Matt
On Wed, Nov 23, 2016 at 4:37 AM, naylor1043 [email protected]
wrote:

Firstly, seasocks is great! Loving the easy c++ connectivity.

Running seasocks on a Pi, using Win10 based clients. Chrome is fine, but
both IE and Edge cause "Received hybi frame with unknown opcode 10",
followed by a disconnect.

Assume 99% this is a ME issue, so any ideas where I should start looking?

Cheers.

Bruce.


You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
#40, or mute the thread
https://github.com/notifications/unsubscribe-auth/AAmsdRYmX1mKrEHx2fxh8IOQnEjKb1_Oks5rBBdagaJpZM4K6bXD
.

from seasocks.

naylor1043 avatar naylor1043 commented on May 13, 2024

Hi Matt,

Thanks for the prompt response. Sorry, no WireShark I'm afraid. Takes IE/Edge 20-30 seconds before the error occurs after initial connection. All seems fine upto the error/disconnect.

Sorry, another more pressing question: my app is talking to hardware via USB on one thread, based on requestes through Seasocks in another thread where I'm calling Server->poll(0) + doing other housekeeping. So the need is an async response to post "WebSocket::send" data from the seasocks server thread or other thread? Looked at your example code in GitHub, but couldn't get my head around it - I'm just a dumb Windows MFC guy, never got into Std :(

Thanks once again.

Bruce.

from seasocks.

mattgodbolt avatar mattgodbolt commented on May 13, 2024

Hi Bruce. First up, I've been unable to find a Windows machine that's up to date enough to run Edge or a recent enough IE, but I'll keep looking.

As for the send, you have two alternatives:

  • keep a list of things that need to be sent yourself and send them just before after the server->poll() on the thread. (What other housekeeping do you need btw? The poll method is usually useful if you want to avoid multiple threads, and do the multiplexing yourself)
  • the "normal" way is to give Seasocks a Runnable or lambda. Call Server->execute([]{ socket->send(); }) or similar. This schedules the thing you pass to it to be run on the thread executing Seasocks. You'll have to be careful about lifetimes of the socket though.

The documentation is poor: I apologise. If you need more help please don't hesitate to contact me directly ([email protected]) and we can save polluting this bug with offtopic stuff!

Cheers, Matt

from seasocks.

mattgodbolt avatar mattgodbolt commented on May 13, 2024

And..back to the bug: "10" is hybi PONG which I am surprised to see Edge send...should be straightforward to fix though!

from seasocks.

mattgodbolt avatar mattgodbolt commented on May 13, 2024
A Pong frame MAY be sent unsolicited.  This serves as a
unidirectional heartbeat.  A response to an unsolicited pong is not
expected.

from seasocks.

mattgodbolt avatar mattgodbolt commented on May 13, 2024

I've checked what I believe is a fix for this bug: can you test when you have a mo and let me know? Thanks!

from seasocks.

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.