Merge pull request #634 from Jimmy99/patch-25

Update 08.2.md
This commit is contained in:
astaxie
2016-04-06 21:52:32 +08:00

View File

@@ -14,7 +14,7 @@ WebSocket URLs begin with ws:// or wss://(SSL). The following figure shows the c
![](images/8.2.websocket.png?raw=true)
Figure 8.2 WebSocket principl
Figure 8.2 WebSocket principle
## WebSocket principles
@@ -99,7 +99,7 @@ As you can see, it's very easy to use the client side JavaScript functions to es
- 1onopen: triggered after connection has been established.
- 2onmessage: triggered after receiving a message.
- 3onerror: triggered after an error has occurred..
- 3onerror: triggered after an error has occurred.
- 4onclose: triggered after the connection has closed.
Server code: