You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+6-34Lines changed: 6 additions & 34 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -25,23 +25,10 @@ Required Modules:
25
25
```javascript
26
26
let {TCPClient} =require('Limitless-TCP');
27
27
28
-
let tcpClient =newTCPClient(str
29
-
:
30
-
address, num
31
-
:
32
-
port, bool
33
-
:
34
-
useHeartbeat
35
-
)
36
-
;
28
+
let tcpClient =newTCPClient( str: address, num: port, bool: useHeartbeat );
37
29
tcpClient.connect();
38
30
39
-
tcpClient.on(str
40
-
:
41
-
event, (callback) => {
42
-
}
43
-
)
44
-
;
31
+
tcpClient.on( str:event, (callback) => {} );
45
32
tcpClient.emit(data);
46
33
```
47
34
@@ -97,27 +84,12 @@ This will not work the other way around, meaning you are not able to connect a n
97
84
```javascript
98
85
let {TCPServer} =require('Limitless-TCP');
99
86
100
-
let tcpServer =newTCPServer(num
101
-
:
102
-
port, bool
103
-
:
104
-
useHeartbeat
105
-
)
87
+
let tcpServer =newTCPServer( num: port, bool: useHeartbeat )
88
+
106
89
tcpServer.listen();
107
90
108
-
tcpServer.on(str
109
-
:
110
-
event, null/ socket
111
-
:
112
-
socket, (callback) => {
113
-
}
114
-
)
115
-
; //If the socket field is null then it listens for tcpServer events instead of socket specific
116
-
tcpServer.emit(data, socket
117
-
:
118
-
socket
119
-
)
120
-
;
91
+
tcpServer.on( str:event, null/socket: socket, (callback) => {} ); //If the socket field is null then it listens for tcpServer events instead of socket specific
0 commit comments