2
0
mirror of https://github.com/esiur/esiur-js.git synced 2026-04-04 05:58:22 +00:00

Instance.Link

This commit is contained in:
2022-08-13 04:00:26 +03:00
parent 1985363ad7
commit 2689bb7fd5
12 changed files with 1595 additions and 829 deletions

View File

@@ -4,7 +4,8 @@ import ExceptionCode from "../../Core/ExceptionCode.js";
import ISocket from "./ISocket.js";
import SocketState from "./SocketState.js";
import NetworkBuffer from "../NetworkBuffer.js";
import DC from '../../Data/DC.js';
export default class WSocket extends ISocket
{
constructor(websocket){
@@ -51,6 +52,7 @@ export default class WSocket extends ISocket
{
try
{
//console.log("TX", new DC(message));
this.ws.send(message);
} catch {
this.state = SocketState.Closed;
@@ -172,6 +174,7 @@ export default class WSocket extends ISocket
try {
this.ws.send(message);
//console.log("TX", message);
} catch {
this.state = SocketState.Closed;
}