diff --git a/README.md b/README.md index 5cc5976..92aa73c 100644 --- a/README.md +++ b/README.md @@ -86,5 +86,5 @@ class MyChat implements MessageComponentInterface { // Then some JavaScript in the browser: var conn = new WebSocket('ws://localhost:8080/echo'); conn.onmessage = function(e) { console.log(e.data); }; - conn.send('Hello Me!'); -``` \ No newline at end of file + conn.onopen = function(e) { conn.send('Hello Me!'); }; +```