Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6343859
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T20:31:41+00:00 2026-05-24T20:31:41+00:00

I must be missing something extremely obvious but I can’t get this work properly.

  • 0

I must be missing something extremely obvious but I can’t get this work properly.

The handshaking is going correctly, but as soon as I send a piece of data, I don’t get the correct data at the server.

Server:

stream.on("data", function(data) {
    if(!handshake) return doHandshake(); // no problems with handshake
    console.log(data);
});

Client:

ws = new WebSocket("ws://localhost:12345");
ws.onopen = function() {
    ws.send(String.fromCharCode(parseInt("89", 16)));
}

What I see in the node.js console:

<Buffer 81 82 ed 68 ae 67 2f e1>

So the keys are ed 68 ae 67, and the encoded data is 2f e1. Using xor decoding the decoded data appears to be c2 89. A c2 got prepended for some unknown reason – the 89 is correct.

Weird things happen with other characters, too:

ws.send(String.fromCharCode(parseInt("ab", 16)));

I get:

<Buffer 81 82 ff 8e 45 34 3d 25>

The decoded data is c2 ab instead of ab.

I’m using the new framing format (Chrome 15) and the Windows version of node (node.exe).

  • What is going wrong here?
  • Is it possible to see what Chrome sends, so as to see where the problem lies?
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-24T20:31:42+00:00Added an answer on May 24, 2026 at 8:31 pm

    Try with Chrome 13 (current stable channel).

    Chrome 14+ uses a newer version of the Web Sockets spec which may not be implemented in your version node websocket server.

    For more info, see the old version of the spec and http://chromestatus.com.

    Furthermore, current versions of Chrome, even the ones that implement the new spec (Chrome 14 and 15 at this time) do not allow sending binary data.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I must be missing something obvious, but I can't make it work I want
I must be missing something obvious here, but I can't seem to get the
I must be missing something totally obvious but I can't seem to get the
I must be missing something very simple, but can't find the answer to this.
I must be missing something obvious here... I can't get .change() to fire on
I must be missing something very obvious, but I've searched all over and can't
I must be missing something obvious, but I can't figure out how to rename
I feel like I must be missing something completely obvious, but I don't see
I know SQL well but I must be missing something really dumb here. This
This seems very basic and I must be missing something, but here goes anyways...

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.