Skip to content

Commit f97c0c6

Browse files
committed
write
1 parent 1a7bef0 commit f97c0c6

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

Diff for: ttest.js

+9
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,15 @@ srv.on('upgrade', function(req, socket, head) {
4747

4848

4949
socket.pipe(sock).pipe(socket);
50+
//req.pipe(r).pipe(socket);
51+
/*console.log(hd.toString('utf-8'));
52+
var str = Object.keys(res.headers).map(function(i) {
53+
return i + ": " + res.headers[i];
54+
}).join('\r\n');
55+
socket.write("HTTP/1.1 101 Switching Protocols\r\n" + str);
56+
57+
socket.write(hd);
58+
socket.pipe(sock).pipe(socket);*/
5059
});
5160

5261
r.end();

0 commit comments

Comments
 (0)