From 7289f2d8001492a57a588dedd8f625655b8440ca Mon Sep 17 00:00:00 2001 From: taofish <1037936099@qq.com> Date: Tue, 5 Apr 2016 13:53:54 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E5=AE=A2=E6=88=B7=E7=AB=AF?= =?UTF-8?q?=E8=B0=83=E7=94=A8=E9=94=99=E8=AF=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index e973114..d3334a1 100644 --- a/README.md +++ b/README.md @@ -74,15 +74,15 @@ httpServer.on('upgrade', function (req, socket, head) { ```js var ws = new WebSocket("ws://host:port/"); -socket.onopen = function() { +ws.onopen = function() { //do something when connection estabilished }; -socket.onmessage = function(message) { +ws.onmessage = function(message) { //do something when message arrives }; -socket.onclose = function() { +ws.onclose = function() { //do something when connection close };