Compare commits
3 Commits
v0.1.0-dev
...
v0.1.0-dev
Author | SHA1 | Date |
---|---|---|
semantic-release-bot | 0b68d95e21 | |
Derrick Hammer | 8cc499c320 | |
Derrick Hammer | e3b7760050 |
|
@ -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.31](https://git.lumeweb.com/LumeWeb/libs5/compare/v0.1.0-develop.30...v0.1.0-develop.31) (2023-09-02)
|
||||
|
|
|
@ -1,12 +1,12 @@
|
|||
{
|
||||
"name": "@lumeweb/libs5",
|
||||
"version": "0.1.0-develop.32",
|
||||
"version": "0.1.0-develop.33",
|
||||
"lockfileVersion": 3,
|
||||
"requires": true,
|
||||
"packages": {
|
||||
"": {
|
||||
"name": "@lumeweb/libs5",
|
||||
"version": "0.1.0-develop.32",
|
||||
"version": "0.1.0-develop.33",
|
||||
"dependencies": {
|
||||
"@noble/curves": "^1.1.0",
|
||||
"@noble/hashes": "^1.3.1",
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "@lumeweb/libs5",
|
||||
"version": "0.1.0-develop.32",
|
||||
"version": "0.1.0-develop.33",
|
||||
"type": "module",
|
||||
"main": "lib/index.js",
|
||||
"repository": {
|
||||
|
|
|
@ -3,8 +3,10 @@ import { URL } from "url";
|
|||
import * as WS from "ws";
|
||||
import { BasePeer } from "#transports/base.js";
|
||||
import isNode from "detect-node";
|
||||
import net from "net";
|
||||
|
||||
export class WebSocketPeer extends BasePeer implements Peer {
|
||||
declare _socket: WebSocket;
|
||||
sendMessage(message: Uint8Array): void {
|
||||
this._socket.send(message);
|
||||
}
|
||||
|
@ -43,7 +45,7 @@ export class WebSocketPeer extends BasePeer implements Peer {
|
|||
}
|
||||
}
|
||||
end(): void {
|
||||
this._socket.end();
|
||||
this._socket.close();
|
||||
}
|
||||
|
||||
public static async connect(uri: URL): Promise<WebSocket> {
|
||||
|
|
Loading…
Reference in New Issue