tls support
This commit is contained in:
@@ -5,6 +5,7 @@ export interface SocketsPlugin {
|
||||
connect(options: { id: string; }): Promise<void>;
|
||||
send(options: { id: string; message: string }): Promise<void>;
|
||||
disconnect(options: { id: string }): Promise<void>;
|
||||
close(options: { id: string }): Promise<void>;
|
||||
|
||||
addListener(eventName: "state", listenerFunc: (message: { id: string; state: string }) => void): Promise<PluginListenerHandle>;
|
||||
addListener(eventName: "message", listenerFunc: (message: { id: string; message: string }) => void): Promise<PluginListenerHandle>;
|
||||
|
||||
@@ -98,7 +98,10 @@ export default class Socket {
|
||||
Sockets.disconnect({
|
||||
id: this.id,
|
||||
});
|
||||
}
|
||||
|
||||
close() {
|
||||
this.disconnect();
|
||||
SocketManager.getInstance().unregisterSocket(this);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user