File tree 1 file changed +19
-19
lines changed 1 file changed +19
-19
lines changed Original file line number Diff line number Diff line change @@ -5,25 +5,25 @@ TCP.js is a library developed during the LinkedIn intern hackday 2011. It will p
5
5
6
6
Sample Code
7
7
-------
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();
27
27
28
28
Disclaimer
29
29
----------
You can’t perform that action at this time.
0 commit comments