
使用Node.js从零开始构建WebSocket服务器(英文版)
来自 网络整理·免费领取学习资源
6,736 领取 · 8,086 收藏更新于 2026年9月20日
这份资料来自网络整理2026年的付费VIP课,内容以视频为主,对应《使用Node.js从零开始构建WebSocket服务器(英文版)》。官网需要单独购买,有集上可以免费领取。
课程目录
- 1 – Introduction
- 1 -Introduction
- 1 -Introduction.srt
- 1 -Introduction.vtt
- 2 -To build a WebSocket server, we need to be RFC compliant
- 2 -To build a WebSocket server, we need to be RFC compliant.srt
- 2 -To build a WebSocket server, we need to be RFC compliant.vtt
- -
- 2 – Creating a NodeJS server
- 1 -Overview of HTML and CSS
- 1 -Overview of HTML and CSS.srt
- 1 -Overview of HTML and CSS.vtt
- 1 -websocket_server_starting_code
- 2 -Setting up our HTTP server
- 2 -Setting up our HTTP server.srt
- 2 -Setting up our HTTP server.vtt
- 3 -Creating custom modules and finishing off the HTTP server
- 3 -Creating custom modules and finishing off the HTTP server.srt
- 3 -Creating custom modules and finishing off the HTTP server.vtt
- 4 -Implementing basic error handling
- 4 -Implementing basic error handling.srt
- 4 -Implementing basic error handling.vtt
- 5 -Using Run and Debug to examine the forEach loop
- 5 -Using Run and Debug to examine the forEach loop.srt
- 5 -Using Run and Debug to examine the forEach loop.vtt
- 6 -Testing our errors
- 6 -Testing our errors.srt
- 6 -Testing our errors.vtt
- 7 -websocket_server_http_server
- -
- 3 – Establishing a WebSocket Connection
- 1 -Using the ‘upgrade’ event listener to receive 3 important object
- 1 -Using the ‘upgrade’ event listener to receive 3 important object.srt
- 1 -Using the ‘upgrade’ event listener to receive 3 important object.vtt
- 10 -websocket_server_establishing_WebSocket_connection
- 2 -Examining the request object
- 2 -Examining the request object.srt
- 2 -Examining the request object.vtt
- 3 -Reading the client’s opening handshake request headers
- 3 -Reading the client’s opening handshake request headers.srt
- 3 -Reading the client’s opening handshake request headers.vtt
- 4 -Sending a 400 Bad Request response if the client handshake headers fail
- 4 -Sending a 400 Bad Request response if the client handshake headers fail.srt
- 4 -Sending a 400 Bad Request response if the client handshake headers fail.vtt
- 5 -Generate the server response headers object
- 5 -Generate the server response headers object.srt
- 5 -Generate the server response headers object.vtt
- 6 -Extracting the Sec-WebSocket-Key and using the crypto module
- 6 -Extracting the Sec-WebSocket-Key and using the crypto module.srt
- 6 -Extracting the Sec-WebSocket-Key and using the crypto module.vtt
- 7 -Timeout! What is SHA-hashing and the crypto module
- 7 -Timeout! What is SHA-hashing and the crypto module.srt
- 7 -Timeout! What is SHA-hashing and the crypto module.vtt
- 8 -Generate the Sec-WebSocket-Accept value and send back headers to the client
- 8 -Generate the Sec-WebSocket-Accept value and send back headers to the client.srt
- 8 -Generate the Sec-WebSocket-Accept value and send back headers to the client.vtt
- 9 -Testing our code and opening up a valid WebSocket connection
- 9 -Testing our code and opening up a valid WebSocket connection.srt
- 9 -Testing our code and opening up a valid WebSocket connection.vtt
- -
- 4 – Receiving WebSocket Data
- 1 -Setting up our file for the next goal
- 1 -Setting up our file for the next goal.srt
- 1 -Setting up our file for the next goal.vtt
- 10 -Why is the letter a sent as 7 bytes
- 10 -Why is the letter a sent as 7 bytes.srt
- 10 -Why is the letter a sent as 7 bytes.vtt
- 11 -Using the Debugger tool to analyze code
- 11 -Using the Debugger tool to analyze code.srt
- 11 -Using the Debugger tool to analyze code.vtt
- 12 -Extracting the FIN bit
- 12 -Extracting the FIN bit.srt
- 12 -Extracting the FIN bit.vtt
- 13 -Bitwise operators
- 13 -Bitwise operators.srt
- 13 -Bitwise operators.vtt
- 14 -Extracting the MASK, OPCODE and initial LENGTH information
- 14 -Extracting the MASK, OPCODE and initial LENGTH information.srt
- 14 -Extracting the MASK, OPCODE and initial LENGTH information.vtt
- 15 -Setting up code to extract the payload length details
- 15 -Setting up code to extract the payload length details.srt
- 15 -Setting up code to extract the payload length details.vtt
- 16 -The 3 categories of payload lengths
- 16 -The 3 categories of payload lengths.srt
- 16 -The 3 categories of payload lengths.vtt
- 17 -Calculating the payload length
- 17 -Calculating the payload length.srt
- 17 -Calculating the payload length.vtt
- 18 -Payload length checks
- 18 -Payload length checks.srt
- 18 -Payload length checks.vtt
- 19 -Extract the Masking Key
- 19 -Extract the Masking Key.srt
- 19 -Extract the Masking Key.vtt
- 2 -The socket object inherits from the stream.Duplex class
- 2 -The socket object inherits from the stream.Duplex class.srt
- 2 -The socket object inherits from the stream.Duplex class.vtt
- 20 -Define the getPayload method
- 20 -Define the getPayload method.srt
- 20 -Define the getPayload method.vtt
- 21 -Extract one full frame of data (masked)
- 21 -Extract one full frame of data (masked).srt
- 21 -Extract one full frame of data (masked).vtt
- 22 -Unmasking the frame payload
- 22 -Unmasking the frame payload.srt
- 22 -Unmasking the frame payload.vtt
- 23 -What is the modulus operand
- 23 -What is the modulus operand.srt
- 23 -What is the modulus operand.vtt
- 24 -Create a persistent fragments array and check for more frames (FIN bit check)
- 24 -Create a persistent fragments array and check for more frames (FIN bit check).srt
- 24 -Create a persistent fragments array and check for more frames (FIN bit check).vtt
- 25 -SMALL payloads – Using the debugger to analyze logic
- 25 -SMALL payloads – Using the debugger to analyze logic.srt
- 25 -SMALL payloads – Using the debugger to analyze logic.vtt
- 26 -Fixing the error in our consumePayload method
- 26 -Fixing the error in our consumePayload method.srt
- 26 -Fixing the error in our consumePayload method.vtt
- 27 -Adding a prepopulate button to the HTML
- 27 -Adding a prepopulate button to the HTML.srt
- 27 -Adding a prepopulate button to the HTML.vtt
- 28 -MEDIUM Payloads – Using the debugger to analyze logic
- 28 -MEDIUM Payloads – Using the debugger to analyze logic.srt
- 28 -MEDIUM Payloads – Using the debugger to analyze logic.vtt
- 29 -LARGE Payloads Part 1 of 3. Understanding getLength logic
- 29 -LARGE Payloads Part 1 of 3. Understanding getLength logic.srt
- 29 -LARGE Payloads Part 1 of 3. Understanding getLength logic.vtt
- 3 -Defining our data event handler
- 3 -Defining our data event handler.srt
- 3 -Defining our data event handler.vtt
- 30 -LARGE Payloads Part 2 of 3. Waiting for additional chunks
- 30 -LARGE Payloads Part 2 of 3. Waiting for additional chunks.srt
- 30 -LARGE Payloads Part 2 of 3. Waiting for additional chunks.vtt
- 31 -LARGE Payloads Part 3 of 3. Processing the entire payload into _fragments
- 31 -LARGE Payloads Part 3 of 3. Processing the entire payload into _fragments.srt
- 31 -LARGE Payloads Part 3 of 3. Processing the entire payload into _fragments.vtt
- 32 -Improvements comments and adding opcode checks
- 32 -Improvements comments and adding opcode checks.srt
- 32 -Improvements comments and adding opcode checks.vtt
- 33 -Advanced – chunk size variation between debugger vs live environment
- 33 -Advanced – chunk size variation between debugger vs live environment.srt
- 33 -Advanced – chunk size variation between debugger vs live environment.vtt
- 34 -Improving our _getInfo method
- 34 -Improving our _getInfo method.srt
- 34 -Improving our _getInfo method.vtt
- 35 -websocket_server_receiving_data
- 4 -Quick cut – adding the ‘end’ event listener to our socket object
- 4 -Quick cut – adding the ‘end’ event listener to our socket object.srt
- 4 -Quick cut – adding the ‘end’ event listener to our socket object.vtt
- 5 -Define the processBuffer function
- 5 -Define the processBuffer function.srt
- 5 -Define the processBuffer function.vtt
- 6 -The WebSocket binary frame structure
- 6 -The WebSocket binary frame structure.srt
- 6 -The WebSocket binary frame structure.vtt
- 7 -Coding the task management looping function
- 7 -Coding the task management looping function.srt
- 7 -Coding the task management looping function.vtt
- 8 -Extract the first 2 bytes of data from the WebSocket data frame
- 8 -Extract the first 2 bytes of data from the WebSocket data frame.srt
- 8 -Extract the first 2 bytes of data from the WebSocket data frame.vtt
- 9 -What are Buffers
- 9 -What are Buffers.srt
- 9 -What are Buffers.vtt
- -
- 5 – Sending WebSocket Data
- 1 -Getting project files ready to send data to the client
- 1 -Getting project files ready to send data to the client.srt
- 1 -Getting project files ready to send data to the client.vtt
- 10 -Using debugger tool to examine code
- 10 -Using debugger tool to examine code.srt
- 10 -Using debugger tool to examine code.vtt
- 11 -Displaying the WebSocket message on the client-side
- 11 -Displaying the WebSocket message on the client-side.srt
- 11 -Displaying the WebSocket message on the client-side.vtt
- 12 -websocket_server_sending_data
- 2 -Calculating the size of the variable-length header field
- 2 -Calculating the size of the variable-length header field.srt
- 2 -Calculating the size of the variable-length header field.vtt
- 3 -Create the binary frame buffer blueprint
- 3 -Create the binary frame buffer blueprint.srt
- 3 -Create the binary frame buffer blueprint.vtt
- 4 -Creating the first byte of the frame
- 4 -Creating the first byte of the frame.srt
- 4 -Creating the first byte of the frame.vtt
- 5 -Bitwise shift operators
- 5 -Bitwise shift operators.srt
- 5 -Bitwise shift operators.vtt
- 6 -Populate the frame header with data
- 6 -Populate the frame header with data.srt
- 6 -Populate the frame header with data.vtt
- 7 -Sending the frame to the client
- 7 -Sending the frame to the client.srt
- 7 -Sending the frame to the client.vtt
- 8 -Testing whether the client received the frame
- 8 -Testing whether the client received the frame.srt
- 8 -Testing whether the client received the frame.vtt
- 9 -Creating a reset function
- 9 -Creating a reset function.srt
- 9 -Creating a reset function.vtt
- -
- 6 – Responding to a closure frame
- 1 -Setting up project code and defining our mini-goal
- 1 -Setting up project code and defining our mini-goal.srt
- 1 -Setting up project code and defining our mini-goal.vtt
- 10 -Extracting the server response from the CloseEvent object
- 10 -Extracting the server response from the CloseEvent object.srt
- 10 -Extracting the server response from the CloseEvent object.vtt
- 11 -Sending a closure frame if the masking bit is not set correctly by the client
- 11 -Sending a closure frame if the masking bit is not set correctly by the client.srt
- 11 -Sending a closure frame if the masking bit is not set correctly by the client.vtt
- 12 -Check whether client has sent a closure code
- 12 -Check whether client has sent a closure code.srt
- 12 -Check whether client has sent a closure code.vtt
- 13 -Displaying default closure message (for normal closure event)
- 13 -Displaying default closure message (for normal closure event).srt
- 13 -Displaying default closure message (for normal closure event).vtt
- 14 -Fixing comments and removing server response text when new connection is made
- 14 -Fixing comments and removing server response text when new connection is made.srt
- 14 -Fixing comments and removing server response text when new connection is made.vtt
- 15 -Server side validation for text
- 15 -Server side validation for text.srt
- 15 -Server side validation for text.vtt
- 16 -Fixing the refresh issue killing the server
- 16 -Fixing the refresh issue killing the server.srt
- 16 -Fixing the refresh issue killing the server.vtt
- 17 -websocket_server_final_code.rar
- 2 -Closing handshake
- 2 -Closing handshake.srt
- 2 -Closing handshake.vtt
- 3 -Extracting the body (closure code and reason) of the close frame
- 3 -Extracting the body (closure code and reason) of the close frame.srt
- 3 -Extracting the body (closure code and reason) of the close frame.vtt
- 4 -Close Frame Structure
- 4 -Close Frame Structure.srt
- 4 -Close Frame Structure.vtt
- 5 -Construct the payload buffer for the close frame
- 5 -Construct the payload buffer for the close frame.srt
- 5 -Construct the payload buffer for the close frame.vtt
- 6 -Completing and sending the final close frame back to the client
- 6 -Completing and sending the final close frame back to the client.srt
- 6 -Completing and sending the final close frame back to the client.vtt
- 7 -Testing our code
- 7 -Testing our code.srt
- 7 -Testing our code.vtt
- 8 -Using Wireshark to master the TCP closure process
- 8 -Using Wireshark to master the TCP closure process.srt
- 8 -Using Wireshark to master the TCP closure process.vtt
- 9 -Checking for ping and pong data type, and payloads larger than max size
- 9 -Checking for ping and pong data type, and payloads larger than max size.srt
- 9 -Checking for ping and pong data type, and payloads larger than max size.vtt
包含内容
- · 1 – Introduction
- · 1 -Introduction
- · 1 -Introduction.srt
- · 1 -Introduction.vtt
- · 2 -To build a WebSocket server, we need to be RFC compliant
- · 2 -To build a WebSocket server, we need to be RFC compliant.srt
- · 2 -To build a WebSocket server, we need to be RFC compliant.vtt
- · 2 – Creating a NodeJS server
贡献者
小宇
白银
学习社区
1 人正在学习
编程与技术实践交流
交流编程基础、项目实践、数据库和部署问题。提问请说明环境、复现步骤与已尝试的方法。