Git Product home page Git Product logo

websocketsbook's People

Contributors

kinabalu avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

websocketsbook's Issues

Chapter One

It is not made clear how to run the code. The only hint for running code is node server.js then it tells you to run the client.html. However as far as i can see there is no server running to serve the html file. What i did was split the two elements of code in ch1 and ch1html into two directories then run node server.js in one terminal and open a new terminal and fire up http-server (on :8081) which is a simple http server in node. This worked inasmuch as the socket wrote out to the terminal, not the console log.

Now i wouldn't expect console output to com from the the http running on port 8081 so i ran the console from 8181 the server.js. No console output and two error messages Failed to load resource: the server responded with a status of 426 (Upgrade Required) which i am still trying to work out as i have got the latest node and nam installed.

Chapter 3 Question

When I shutdown the server in ch03/notifications the closeSocket() from "process.on" handler called.
Basically what is the value of the "client_uuid" in this case ? Please note that I am stopping the server and not just particular browser client. In my case I am seeing that the client id (client_uuid) is always the first client which is connected to the server. Why it is the case ? Can you please explain ?

Note: Actually this is not an issue but a question and I thought that using github is the fastest mode to get the response from the author. Please excuse me.

Thanks & Regards,
Mohamed

Event ping on page 15

Hello~
First thanks for your knowledge sharing in your book, it helps me a lot to understand websocket~~
But I found a little mistake here on page 15, it says "PING frames are sent out by the server only, and browser implementations should send back PONG frames in response."
in mdn, it says that "At any point after the handshake, either the client or the server can choose to send a ping to the other party."
Wish your book is getting better and better

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.