mirror of
https://github.com/rustdesk/rustdesk.git
synced 2026-04-27 02:53:20 +03:00
secure connection works
This commit is contained in:
@@ -10,6 +10,7 @@ export default class Websock {
|
||||
_buf: Uint8Array[];
|
||||
_status: any;
|
||||
_latency: number;
|
||||
_secretKey: any;
|
||||
|
||||
constructor(uri: string) {
|
||||
this._eventHandlers = {
|
||||
@@ -30,16 +31,20 @@ export default class Websock {
|
||||
return this._latency;
|
||||
}
|
||||
|
||||
setSecretKey(key: any) {
|
||||
this._secretKey = key;
|
||||
}
|
||||
|
||||
sendMessage(data: any) {
|
||||
this._websocket.send(
|
||||
message.Message.encode(message.Message.fromJSON(data)).finish()
|
||||
message.Message.encode(message.Message.fromPartial(data)).finish()
|
||||
);
|
||||
}
|
||||
|
||||
sendRendezvous(data: any) {
|
||||
this._websocket.send(
|
||||
rendezvous.RendezvousMessage.encode(
|
||||
rendezvous.RendezvousMessage.fromJSON(data)
|
||||
rendezvous.RendezvousMessage.fromPartial(data)
|
||||
).finish()
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user