Update example on index.html
authorRyan Dahl <ry@tinyclouds.org>
Thu, 18 Feb 2010 01:07:08 +0000 (17:07 -0800)
committerRyan Dahl <ry@tinyclouds.org>
Thu, 18 Feb 2010 01:07:08 +0000 (17:07 -0800)
doc/index.html

index 22ac939..ba94ffa 100644 (file)
@@ -76,10 +76,10 @@ var server = tcp.createServer(function (socket) {
   socket.addListener("connect", function () {
     socket.write("hello\r\n");
   });
-  socket.addListener("receive", function (data) {
+  socket.addListener("data", function (data) {
     socket.write(data);
   });
-  socket.addListener("eof", function () {
+  socket.addListener("end", function () {
     socket.write("goodbye\r\n");
     socket.close();
   });