Compare commits

..

3 Commits

Author SHA1 Message Date
semantic-release-bot 0b68d95e21 chore(release): 0.1.0-develop.33 [skip ci]
# [0.1.0-develop.33](https://git.lumeweb.com/LumeWeb/libs5/compare/v0.1.0-develop.32...v0.1.0-develop.33) (2023-09-02)

### Bug Fixes

* need to use close not end on WS transport ([e3b7760](e3b7760050))
2023-09-02 01:02:17 +00:00
Derrick Hammer 8cc499c320
Merge remote-tracking branch 'origin/develop' into develop 2023-09-01 21:01:28 -04:00
Derrick Hammer e3b7760050
fix: need to use close not end on WS transport 2023-09-01 21:01:24 -04:00
4 changed files with 13 additions and 4 deletions

View File

@ -1,3 +1,10 @@
# [0.1.0-develop.33](https://git.lumeweb.com/LumeWeb/libs5/compare/v0.1.0-develop.32...v0.1.0-develop.33) (2023-09-02)
### Bug Fixes
* need to use close not end on WS transport ([e3b7760](https://git.lumeweb.com/LumeWeb/libs5/commit/e3b77600500289acca4aca96d418f25d1d1780b8))
# [0.1.0-develop.32](https://git.lumeweb.com/LumeWeb/libs5/compare/v0.1.0-develop.31...v0.1.0-develop.32) (2023-09-02) # [0.1.0-develop.32](https://git.lumeweb.com/LumeWeb/libs5/compare/v0.1.0-develop.31...v0.1.0-develop.32) (2023-09-02)
# [0.1.0-develop.31](https://git.lumeweb.com/LumeWeb/libs5/compare/v0.1.0-develop.30...v0.1.0-develop.31) (2023-09-02) # [0.1.0-develop.31](https://git.lumeweb.com/LumeWeb/libs5/compare/v0.1.0-develop.30...v0.1.0-develop.31) (2023-09-02)

4
npm-shrinkwrap.json generated
View File

@ -1,12 +1,12 @@
{ {
"name": "@lumeweb/libs5", "name": "@lumeweb/libs5",
"version": "0.1.0-develop.32", "version": "0.1.0-develop.33",
"lockfileVersion": 3, "lockfileVersion": 3,
"requires": true, "requires": true,
"packages": { "packages": {
"": { "": {
"name": "@lumeweb/libs5", "name": "@lumeweb/libs5",
"version": "0.1.0-develop.32", "version": "0.1.0-develop.33",
"dependencies": { "dependencies": {
"@noble/curves": "^1.1.0", "@noble/curves": "^1.1.0",
"@noble/hashes": "^1.3.1", "@noble/hashes": "^1.3.1",

View File

@ -1,6 +1,6 @@
{ {
"name": "@lumeweb/libs5", "name": "@lumeweb/libs5",
"version": "0.1.0-develop.32", "version": "0.1.0-develop.33",
"type": "module", "type": "module",
"main": "lib/index.js", "main": "lib/index.js",
"repository": { "repository": {

View File

@ -3,8 +3,10 @@ import { URL } from "url";
import * as WS from "ws"; import * as WS from "ws";
import { BasePeer } from "#transports/base.js"; import { BasePeer } from "#transports/base.js";
import isNode from "detect-node"; import isNode from "detect-node";
import net from "net";
export class WebSocketPeer extends BasePeer implements Peer { export class WebSocketPeer extends BasePeer implements Peer {
declare _socket: WebSocket;
sendMessage(message: Uint8Array): void { sendMessage(message: Uint8Array): void {
this._socket.send(message); this._socket.send(message);
} }
@ -43,7 +45,7 @@ export class WebSocketPeer extends BasePeer implements Peer {
} }
} }
end(): void { end(): void {
this._socket.end(); this._socket.close();
} }
public static async connect(uri: URL): Promise<WebSocket> { public static async connect(uri: URL): Promise<WebSocket> {