Skip to content

Commit b3bdde6

Browse files
committed
fix(connection): should send TEXT frame with writeText method
1 parent 308dfe2 commit b3bdde6

20 files changed

+122
-170
lines changed

CHANGES.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
# Changes
22

3+
## v0.1.2
4+
5+
- fix(connection): should send TEXT frame with writeText method.
6+
37
## v0.1.1
48

59
- fix(connection): did not reset timeout if it is zero.

package-lock.json

Lines changed: 94 additions & 146 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@litert/websocket",
3-
"version": "0.1.1",
3+
"version": "0.1.2",
44
"description": "The websocket protocol library for LiteRT.",
55
"main": "lib/index.js",
66
"scripts": {
@@ -11,7 +11,7 @@
1111
"clean": "rm -rf lib examples test",
1212
"typecheck": "tsc -p tsconfig.json --noEmit",
1313
"lint": "eslint --ext ts src",
14-
"prepare": "husky install"
14+
"prepare": "husky"
1515
},
1616
"repository": {
1717
"type": "git",
@@ -30,11 +30,11 @@
3030
"typings": "lib/index.d.ts",
3131
"types": "lib/index.d.ts",
3232
"devDependencies": {
33-
"@commitlint/cli": "^18.4.3",
34-
"@commitlint/config-conventional": "^18.4.3",
33+
"@commitlint/cli": "^18.6.0",
34+
"@commitlint/config-conventional": "^18.6.0",
3535
"@litert/eslint-plugin-rules": "^0.1.6",
36-
"@types/node": "^20.10.4",
37-
"husky": "^8.0.3",
36+
"@types/node": "^20.11.16",
37+
"husky": "^9.0.10",
3838
"serve": "^14.2.1",
3939
"typescript": "^5.3.3"
4040
},

src/examples/http/client.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/**
2-
* Copyright 2023 Angus.Fenying <[email protected]>
2+
* Copyright 2024 Angus.Fenying <[email protected]>
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.

src/examples/http/server.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/**
2-
* Copyright 2023 Angus.Fenying <[email protected]>
2+
* Copyright 2024 Angus.Fenying <[email protected]>
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.

src/examples/https/client.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/**
2-
* Copyright 2023 Angus.Fenying <[email protected]>
2+
* Copyright 2024 Angus.Fenying <[email protected]>
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.

src/examples/https/server.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/**
2-
* Copyright 2023 Angus.Fenying <[email protected]>
2+
* Copyright 2024 Angus.Fenying <[email protected]>
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.

src/lib/AbstractConnection.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/**
2-
* Copyright 2023 Angus.Fenying <[email protected]>
2+
* Copyright 2024 Angus.Fenying <[email protected]>
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -166,7 +166,7 @@ export abstract class AbstractWsConnection extends $Events.EventEmitter implemen
166166
const maskKey = this._maskKey === true ? _.createRandomMaskKey() : (this._maskKey || null);
167167

168168
this._socket!.write(this._encoder.createHeader(
169-
D.EOpcode.BINARY,
169+
D.EOpcode.TEXT,
170170
Buffer.byteLength(data),
171171
maskKey
172172
));

src/lib/Client.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/**
2-
* Copyright 2023 Angus.Fenying <[email protected]>
2+
* Copyright 2024 Angus.Fenying <[email protected]>
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.

src/lib/Decl.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/**
2-
* Copyright 2023 Angus.Fenying <[email protected]>
2+
* Copyright 2024 Angus.Fenying <[email protected]>
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.

0 commit comments

Comments
 (0)