Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Update the readme, it was just plain wrong.

  • Loading branch information...
commit 1ed2a028dafdc5766b60ccc54ea503d652407d9f 1 parent fdd934b
@creationix authored
Showing with 7 additions and 8 deletions.
  1. +7 −8 README.markdown
View
15 README.markdown
@@ -5,15 +5,14 @@
var websocket = require("websocket");
var server = websocket.createServer(function (socket) {
- socket.addListener("connect", function () {
- socket.send("hello\r\n");
- });
- socket.addListener("receive", function (data) {
- socket.send(data);
+ socket.write("hello\r\n");
+
+ socket.addListener("data", function (data) {
+ socket.write(data);
});
- socket.addListener("eof", function () {
- socket.send("goodbye\r\n");
- socket.close();
+ socket.addListener("end", function () {
+ socket.write("goodbye\r\n");
+ socket.end();
});
});
server.listen(7000, "localhost");
Please sign in to comment.
Something went wrong with that request. Please try again.