@cloudgaming/rpc
Advanced tools
Comparing version 1.10.0 to 1.11.0
@@ -33,9 +33,4 @@ import { RpcClientObject, FunctionName, FunctionPayload, FunctionResult } from './types'; | ||
private generateSessionId; | ||
/** | ||
* 设置 sessionId;仅当在恢复重连会话时应该设置,断开后会自动重新生成 | ||
* @param id 新的 sessionId | ||
*/ | ||
setSessionId(id: string): void; | ||
} | ||
export {}; | ||
//# sourceMappingURL=Client.d.ts.map |
@@ -281,14 +281,5 @@ "use strict"; | ||
generateSessionId() { | ||
const newId = nanoid.nanoid(32); | ||
debug('created new sessionId', newId); | ||
this.setSessionId(newId); | ||
} | ||
/** | ||
* 设置 sessionId;仅当在恢复重连会话时应该设置,断开后会自动重新生成 | ||
* @param id 新的 sessionId | ||
*/ | ||
setSessionId(id) { | ||
this.sessionId = id; | ||
this.sessionId = nanoid.nanoid(32); | ||
this.endpoint = this.baseEndpoint + '?sessionId=' + this.sessionId + (this.type ? `&type=${this.type}` : ''); | ||
debug('new sessionId set', id); | ||
debug('created new sessionId', this.sessionId); | ||
} | ||
@@ -295,0 +286,0 @@ } |
@@ -86,3 +86,5 @@ /// <reference types="node" /> | ||
/** agent->server */ | ||
StartApp = "sa" | ||
StartApp = "sa", | ||
/** client->server */ | ||
SessionInfo = "si" | ||
} | ||
@@ -155,3 +157,5 @@ type RpcMethod<T extends keyof typeof FunctionName> = (arg: FunctionPayload[(typeof FunctionName)[T]]) => Promise<FunctionResult[(typeof FunctionName)[T]]>; | ||
[FunctionName.RenewGame]: { | ||
/** server name */ | ||
/** server name | ||
* @deprecated dependent on renewToken | ||
*/ | ||
serverId: number; | ||
@@ -332,2 +336,3 @@ /** renew token */ | ||
}; | ||
[FunctionName.SessionInfo]: Record<string, never>; | ||
}; | ||
@@ -451,2 +456,7 @@ export type FunctionResult = { | ||
}; | ||
[FunctionName.SessionInfo]: { | ||
serverId: number; | ||
gameName: string; | ||
queueId: number; | ||
}; | ||
}; | ||
@@ -453,0 +463,0 @@ export interface IFunctionRequest<T extends FunctionName = FunctionName> { |
@@ -90,3 +90,5 @@ "use strict"; | ||
FunctionName["StartApp"] = "sa"; | ||
/** client->server */ | ||
FunctionName["SessionInfo"] = "si"; | ||
})(FunctionName || (exports.FunctionName = FunctionName = {})); | ||
//# sourceMappingURL=types.js.map |
{ | ||
"name": "@cloudgaming/rpc", | ||
"version": "1.10.0", | ||
"version": "1.11.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
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
62638
1023