Skip to content

Commit dd0282d

Browse files
author
Brian Geffon
committed
updated readme
1 parent 277d778 commit dd0282d

File tree

1 file changed

+19
-19
lines changed

1 file changed

+19
-19
lines changed

README.md

Lines changed: 19 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -5,25 +5,25 @@ TCP.js is a library developed during the LinkedIn intern hackday 2011. It will p
55

66
Sample Code
77
-------
8-
var host = "127.0.0.1";
9-
var port = 5900;
10-
11-
var sock = new TCPClient(host,port);
12-
13-
sock.on("connected", function() {
14-
log("connected to " + host + ":" + port);
15-
sock.send("Hello from a browser!");
16-
});
17-
18-
sock.on("closed", function() {
19-
log("The connection has closed :(");
20-
});
21-
22-
sock.on("data", function(msg){
23-
log("data arrived: " + msg);
24-
});
25-
26-
sock.connect();
8+
var host = "127.0.0.1";
9+
var port = 5900;
10+
11+
var sock = new TCPClient(host,port);
12+
13+
sock.on("connected", function() {
14+
log("connected to " + host + ":" + port);
15+
sock.send("Hello from a browser!");
16+
});
17+
18+
sock.on("closed", function() {
19+
log("The connection has closed :(");
20+
});
21+
22+
sock.on("data", function(msg){
23+
log("data arrived: " + msg);
24+
});
25+
26+
sock.connect();
2727

2828
Disclaimer
2929
----------

0 commit comments

Comments
 (0)