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: docs/events.md
+4-4Lines changed: 4 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -62,12 +62,12 @@ server.on('listen', (data) => console.log(`${data.protocol} on ${data.address}:$
62
62
63
63
This event will fire when a user logs into the server. Executing function needs to take one arugment of type `object`. The `object` contains the following information:
64
64
65
-
**username: `string` the user who has logged in**\
65
+
**user: `string` the user who has logged in**\
66
66
**address: `string` remote address from where the user logged in**\
67
67
**total: `number` total amount of open sessions**
68
68
69
69
```{code-block} javascript
70
-
server.on('login', (data) => console.log(`${data.username} logged in from ${data.address} total users ${data.total}))
70
+
server.on('login', (data) => console.log(`${data.user} logged in from ${data.address} total users ${data.total}))
71
71
```
72
72
73
73
### logoff
@@ -77,10 +77,10 @@ server.on('login', (data) => console.log(`${data.username} logged in from ${data
77
77
78
78
This event will fire when a user logs off from the server. Executing function needs to take one arugment of type `object`. The `object` contains the following information:
79
79
80
-
**username: `string` the user who has logged off**\
80
+
**user: `string` the user who has logged off**\
81
81
**address: `string` remote address from where the user was logged in**\
82
82
**total: `number` total amount of open sessions**
83
83
84
84
```{code-block} javascript
85
-
server.on('logoff', (data) => console.log(`${data.username} logged off from ${data.address} total users ${data.total}))
85
+
server.on('logoff', (data) => console.log(`${data.user} logged off from ${data.address} total users ${data.total}))
0 commit comments