Improve protocol class
- Move destroy logic into the class itself - Improve logging a bit - Remove the record option; we should always do this when using permessage-deflate. - Let debug port be null (it can be null in the message args). - Add setSocket so we don't have to initiate a connection to set it. - Move inflate bytes logic into the class itself.
This commit is contained in:
@@ -743,6 +743,11 @@ export class PersistentProtocol implements IMessagePassingProtocol {
|
||||
}, Math.max(ProtocolConstants.KeepAliveTimeoutTime - timeSinceLastIncomingMsg, 0) + 5);
|
||||
}
|
||||
|
||||
// NOTE@coder: Set the socket without initiating a reconnect.
|
||||
public setSocket(socket: ISocket): void {
|
||||
this._socket = socket;
|
||||
}
|
||||
|
||||
public getSocket(): ISocket {
|
||||
return this._socket;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user