@cloudgaming/rpc
Advanced tools
Comparing version 1.9.1 to 1.10.0
@@ -33,4 +33,9 @@ import { RpcClientObject, FunctionName, FunctionPayload, FunctionResult } from './types'; | ||
private generateSessionId; | ||
/** | ||
* 设置 sessionId;仅当在恢复重连会话时应该设置,断开后会自动重新生成 | ||
* @param id 新的 sessionId | ||
*/ | ||
setSessionId(id: string): void; | ||
} | ||
export {}; | ||
//# sourceMappingURL=Client.d.ts.map |
@@ -281,5 +281,14 @@ "use strict"; | ||
generateSessionId() { | ||
this.sessionId = nanoid.nanoid(32); | ||
const newId = nanoid.nanoid(32); | ||
debug('created new sessionId', newId); | ||
this.setSessionId(newId); | ||
} | ||
/** | ||
* 设置 sessionId;仅当在恢复重连会话时应该设置,断开后会自动重新生成 | ||
* @param id 新的 sessionId | ||
*/ | ||
setSessionId(id) { | ||
this.sessionId = id; | ||
this.endpoint = this.baseEndpoint + '?sessionId=' + this.sessionId + (this.type ? `&type=${this.type}` : ''); | ||
debug('created new sessionId', this.sessionId); | ||
debug('new sessionId set', id); | ||
} | ||
@@ -286,0 +295,0 @@ } |
{ | ||
"name": "@cloudgaming/rpc", | ||
"version": "1.9.1", | ||
"version": "1.10.0", | ||
"main": "dist/index.js", | ||
@@ -5,0 +5,0 @@ "type": "commonjs", |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
62693
1025