Skip to content
This repository was archived by the owner on Oct 12, 2024. It is now read-only.

Commit f43c05b

Browse files
committed
docs: change README.md
1 parent 7ffe7b2 commit f43c05b

File tree

1 file changed

+3
-12
lines changed

1 file changed

+3
-12
lines changed

README.md

Lines changed: 3 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -59,31 +59,22 @@ import { tap } from 'rxjs/operators';
5959
export class YourService {
6060
constructor(private socket: Socketio) {}
6161

62-
sendMessage(msg: string) {
62+
send(msg: string) {
6363
this.socket.emit('message', msg);
6464
}
6565

66-
sendMessages(msg1: string, msg2: string) {
66+
sendMultiple(msg1: string, msg2: string) {
6767
// Chain call.
6868
this.socket.emit('message', msg1).emit('message', msg2);
6969
}
7070

71-
getMessage() {
71+
receive() {
7272
return this.socket.on<string>('message').pipe(
7373
tap((args: string) => {
7474
// Do something...
7575
})
7676
);
7777
}
78-
79-
getAll() {
80-
// Listen to all events.
81-
return this.socket.on<any>().pipe(
82-
tap((data: { eventName: string, args: any }) => {
83-
// Do something...
84-
})
85-
);
86-
}
8778
}
8879
```
8980

0 commit comments

Comments
 (0)