joyent/node — Issue #2099: TCP example app not working.
Author: shancat
Created: 2011-11-14 06:38:56+00:00
State: open

I installed the latest stable node.js for windows (http://nodejs.org/dist/v0.6.1/node-v0.6.1.msi).
The installation went fine.

I copied and pasted the TCP example from the home page:
```javascript
var net = require('net');

var server = net.createServer(function (socket) {
socket.write("Echo server\r\n");
socket.pipe(socket);
server.listen(1337, "127.0.0.1");
});
```
And ran it using node app.js and this came out:

```
node.js:201
throw e; // process.nextTick error, or 'error' event on first tick
^
Error: write ECONNRESET
at errnoException (net.js:614:11)
at Socket._write (net.js:435:18)
at Socket.write (net.js:424:15)
at Server. (C:\node\app.js:4:10)
at Server.emit (events.js:67:17)
at TCP.onconnection (net.js:809:8)
```

I'm using Windows Vista Home Premium Service Pack 2 32-bit.