Skip to content

Commit 4d71cb2

Browse files
author
James Halliday
committed
other version of netcat
1 parent ec6f789 commit 4d71cb2

File tree

2 files changed

+16
-0
lines changed

2 files changed

+16
-0
lines changed

networks.markdown

+6
Original file line numberDiff line numberDiff line change
@@ -151,6 +151,12 @@ With netcat you can speak tcp directly.
151151
$ nc -lp 5000
152152
```
153153

154+
or if that doesn't work try:
155+
156+
```
157+
$ nc -l 5000
158+
```
159+
154160
then connect to your server in another terminal:
155161

156162
```

networks/server.js

+10
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
var http = require('http');
2+
var parseform = require('body/any');
3+
4+
var server = http.createServer(function (req, res) {
5+
parseform(req, res, function (err, params) {
6+
console.log(params);
7+
res.end('ok\n');
8+
});
9+
});
10+
server.listen(5000);

0 commit comments

Comments
 (0)