Errata

WebSocket

The errata list is a list of errors and their corrections that were found after the product was released.

The following errata were submitted by our customers and have not yet been approved or disproved by the author or editor. They solely represent the opinion of the customer.

Color Key: Serious technical mistake Minor technical mistake Language or formatting error Typo Question Note Update

Version Location Description Submitted by Date submitted
PDF Page 1
First paragraph, second sentence

The second sentence of the book reads,

"WebSocket gives you a bidirectional, full-duplex communications channel that operates over HTTP through a single socket."

Besides the misspelling of bi-directional, the statement is inaccurate. Websockets make use of TCP as the transport layer. HTTP is only used to make the initial "upgrade connection" request.

Frederick John  Sep 29, 2018 
PDF, ePub Page 5
<head>

Long code lines are truncated instead of wrapped, like so:

<link rel="stylesheet" href="http://maxcdn.bootstrapcdn.com/bootstrap/3.2.0/css/bootstrap.min.css"
<link rel="stylesheet" href="http://maxcdn.bootstrapcdn.com/bootstrap/3.2.0/css/bootstrap-theme.mi

This is not a problem in the mobi version of the book, however. So at first I thought I'll just use that version instead. No way, José! The Kindle reader doesn't let me copy the code. I have to copy the (incomplete) code from the pdf or epub versions, and then read from screen in the kindle version, and type in the missing characters.

Chapter 2 has another issue that's related to this problem: there is no COMPLETE code in this chapter, which almost guarantees that the reader gets something wrong when copying and pasting the code snippets together. Sure enough, after going through the stocks example for hours I still haven't gotten it to work.

Chapter 3 has a chat application, with complete code listings. Great! But at least on my computer, the "node-uI" module could not get found, so I had to make an "npm install node-uuid" command to install it first.

If the code was available for download it would help a lot. And if it was tested on different computers to make sure it's not dependent on stuff that normally isn't installed, it would help even further.

So far, I haven't gotten further than this, but if the rest of the chapters give me similar problems I'll just give up and turn elsewhere for learning websockets.

Christer Tamm  Jan 29, 2015 
PDF, Mobi Page 7
after "Response Headers"

In this sentence:

in your first WebSocket example, and lets learn about why WebSockets should be on"

lets ==> let's

Tony Grant  Nov 29, 2014 
PDF, Mobi Page 9
Third paragraph

In this sentence:

"Throughout this chapter you’ll build a simple stock ticker client using WebSocket as data transport and learn about it’s simple API in the process."

it's => its

Tony Grant  Nov 29, 2014 
PDF Page 14
Code snippet under "Event: Message"

There's a line of code that has:
changeStockEntry(symbol, stocksData[symbol], stocks[symbol]);

but I think it should be:
changeStockEntry(symbol, stocks[symbol], stocksData[symbol]);

as the 2nd parameter is the original value and the 3rd parameter is the new value; and the old values are stored in the stocks array.

rogerb8888  Aug 10, 2015 
PDF Page 18
All code snippets

As Christer pointed out, I don't think the code snippet in Chapter 2 works, especially the server code. I got the client code to work for the most part (even though parts are missing due to truncation). But even looking at the server code, there's a lot that doesn't make sense and I'm not surprised that it's not working. (I'll try to spend time to fix it later.)

rogerb8888  Aug 10, 2015 
PDF Page 25
N/A

The ebook tells the user to use node-uuid, but never tells the user to install it first. There should be a note to tell the user to run:
npm install node-uuid

Roger Bye  Aug 11, 2015 
PDF Page 28
First sentence

Websocket ==> WebSocket

Tony Grant  Nov 29, 2014