Skip to content

Commit 2985b37

Browse files
committed
Fixed formatting in README.md
1 parent fae4315 commit 2985b37

File tree

1 file changed

+6
-34
lines changed

1 file changed

+6
-34
lines changed

README.md

Lines changed: 6 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -25,23 +25,10 @@ Required Modules:
2525
```javascript
2626
let {TCPClient} = require('Limitless-TCP');
2727

28-
let tcpClient = new TCPClient(str
29-
:
30-
address, num
31-
:
32-
port, bool
33-
:
34-
useHeartbeat
35-
)
36-
;
28+
let tcpClient = new TCPClient( str: address, num: port, bool: useHeartbeat );
3729
tcpClient.connect();
3830

39-
tcpClient.on(str
40-
:
41-
event, (callback) => {
42-
}
43-
)
44-
;
31+
tcpClient.on( str: event, (callback) => {} );
4532
tcpClient.emit(data);
4633
```
4734

@@ -97,27 +84,12 @@ This will not work the other way around, meaning you are not able to connect a n
9784
```javascript
9885
let {TCPServer} = require('Limitless-TCP');
9986

100-
let tcpServer = new TCPServer(num
101-
:
102-
port, bool
103-
:
104-
useHeartbeat
105-
)
87+
let tcpServer = new TCPServer( num: port, bool: useHeartbeat )
88+
10689
tcpServer.listen();
10790

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
92+
tcpServer.emit( data, socket: socket );
12193
```
12294

12395
### Connected Sockets and All Sockets:

0 commit comments

Comments
 (0)