mezon-js-protobuf 1.10.74 → 1.10.76
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +43 -43
- package/dist/api/api.d.ts +2 -0
- package/dist/mezon-js-protobuf-node.cjs.js +1 -1
- package/dist/mezon-js-protobuf-node.esm.mjs +1 -1
- package/dist/mezon-js-protobuf.cjs.js +1 -1
- package/dist/mezon-js-protobuf.esm.mjs +1 -1
- package/dist/mezon-js-protobuf.iife.js +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +1 -1
- package/dist/web_socket_adapter_pb.d.ts +0 -38
package/README.md
CHANGED
|
@@ -1,43 +1,43 @@
|
|
|
1
|
-
Mezon JavaScript Protobuf adapter
|
|
2
|
-
========================
|
|
3
|
-
|
|
4
|
-
> Websocket adapter adding protocol buffer support to the [mezon-js](https://www.npmjs.com/package/mezon-js) client.
|
|
5
|
-
|
|
6
|
-
[Mezon](https://github.com/mezon/mezon) is an open-source server designed to power modern games and apps. Features include user accounts, chat, social, matchmaker, realtime multiplayer, and much [more](https://mezon.vn).
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
## Getting Started
|
|
10
|
-
|
|
11
|
-
1. Import the adapter into your project:
|
|
12
|
-
|
|
13
|
-
```shell
|
|
14
|
-
yarn add "mezon-js-protobuf"
|
|
15
|
-
```
|
|
16
|
-
|
|
17
|
-
2. Pass the Protobuf adapter to build the socket object.
|
|
18
|
-
|
|
19
|
-
```js
|
|
20
|
-
import {Client} from "mezon-js";
|
|
21
|
-
import {WebSocketAdapter} from "mezon-js-protobuf"
|
|
22
|
-
|
|
23
|
-
const useSSL = false; // Enable if server is run with an SSL certificate.
|
|
24
|
-
const client = new Client("defaultkey", "127.0.0.1", 7350, useSSL);
|
|
25
|
-
|
|
26
|
-
const trace = false;
|
|
27
|
-
const socket = client.createSocket(useSSL, trace, new WebSocketAdapter());
|
|
28
|
-
```
|
|
29
|
-
|
|
30
|
-
3. Use the WebSocket:
|
|
31
|
-
|
|
32
|
-
```js
|
|
33
|
-
socket.ondisconnect = (evt) => {
|
|
34
|
-
console.info("Disconnected", evt);
|
|
35
|
-
};
|
|
36
|
-
|
|
37
|
-
const session = await socket.connect(session);
|
|
38
|
-
// Socket is open.
|
|
39
|
-
```
|
|
40
|
-
|
|
41
|
-
### License
|
|
42
|
-
|
|
43
|
-
This project is licensed under the [Apache-2 License](https://github.com/nccasia/mezon-js/blob/master/LICENSE).
|
|
1
|
+
Mezon JavaScript Protobuf adapter
|
|
2
|
+
========================
|
|
3
|
+
|
|
4
|
+
> Websocket adapter adding protocol buffer support to the [mezon-js](https://www.npmjs.com/package/mezon-js) client.
|
|
5
|
+
|
|
6
|
+
[Mezon](https://github.com/mezon/mezon) is an open-source server designed to power modern games and apps. Features include user accounts, chat, social, matchmaker, realtime multiplayer, and much [more](https://mezon.vn).
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
## Getting Started
|
|
10
|
+
|
|
11
|
+
1. Import the adapter into your project:
|
|
12
|
+
|
|
13
|
+
```shell
|
|
14
|
+
yarn add "mezon-js-protobuf"
|
|
15
|
+
```
|
|
16
|
+
|
|
17
|
+
2. Pass the Protobuf adapter to build the socket object.
|
|
18
|
+
|
|
19
|
+
```js
|
|
20
|
+
import {Client} from "mezon-js";
|
|
21
|
+
import {WebSocketAdapter} from "mezon-js-protobuf"
|
|
22
|
+
|
|
23
|
+
const useSSL = false; // Enable if server is run with an SSL certificate.
|
|
24
|
+
const client = new Client("defaultkey", "127.0.0.1", 7350, useSSL);
|
|
25
|
+
|
|
26
|
+
const trace = false;
|
|
27
|
+
const socket = client.createSocket(useSSL, trace, new WebSocketAdapter());
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
3. Use the WebSocket:
|
|
31
|
+
|
|
32
|
+
```js
|
|
33
|
+
socket.ondisconnect = (evt) => {
|
|
34
|
+
console.info("Disconnected", evt);
|
|
35
|
+
};
|
|
36
|
+
|
|
37
|
+
const session = await socket.connect(session);
|
|
38
|
+
// Socket is open.
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
### License
|
|
42
|
+
|
|
43
|
+
This project is licensed under the [Apache-2 License](https://github.com/nccasia/mezon-js/blob/master/LICENSE).
|
package/dist/api/api.d.ts
CHANGED
|
@@ -1122,6 +1122,7 @@ export interface MultipartUploadAttachment {
|
|
|
1122
1122
|
filename: string;
|
|
1123
1123
|
urls: string[];
|
|
1124
1124
|
upload_id: string;
|
|
1125
|
+
type_cdn: number;
|
|
1125
1126
|
}
|
|
1126
1127
|
export interface MultipartUploadAttachmentPart {
|
|
1127
1128
|
part_number: number;
|
|
@@ -2164,6 +2165,7 @@ export interface GenerateMeetTokenExternalResponse {
|
|
|
2164
2165
|
token: string;
|
|
2165
2166
|
guest_user_id: string;
|
|
2166
2167
|
guest_access_token: string;
|
|
2168
|
+
url: string;
|
|
2167
2169
|
}
|
|
2168
2170
|
export interface KafkaActionMsg {
|
|
2169
2171
|
clan_id: string;
|