@ives_xxz/framework 2.0.16 → 2.0.17
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/Framework.ts +0 -1
- package/manager/FWSocketManager.ts +3 -3
- package/package.json +1 -1
- package/types/FW.d.ts +3 -5
package/Framework.ts
CHANGED
|
@@ -22,10 +22,10 @@ export default class FWSocketManager extends FWManager implements FW.SocketManag
|
|
|
22
22
|
async createSocket(
|
|
23
23
|
tag: string,
|
|
24
24
|
address: string,
|
|
25
|
-
sender: FW.
|
|
26
|
-
handle: FW.
|
|
25
|
+
sender: FW.Sender,
|
|
26
|
+
handle: FW.Handle,
|
|
27
27
|
config: FW.SocketConfig,
|
|
28
|
-
) {
|
|
28
|
+
): Promise<FW.Socket> {
|
|
29
29
|
const proxy = new FWSocket().createSocket(address, tag, sender, handle, {
|
|
30
30
|
heartTimeout: config.heartTimeout,
|
|
31
31
|
heartWeakTime: config.heartWeakTime,
|
package/package.json
CHANGED
package/types/FW.d.ts
CHANGED
|
@@ -1837,8 +1837,6 @@ declare namespace FW {
|
|
|
1837
1837
|
retryCondition?: (error: any, retryCount: number) => boolean;
|
|
1838
1838
|
};
|
|
1839
1839
|
|
|
1840
|
-
type Promise = (resolve: (value: any) => void, reject: (reason?: any) => void) => void;
|
|
1841
|
-
|
|
1842
1840
|
type PromiseAllResult<T = any> = {
|
|
1843
1841
|
success: Array<{ id: number; value: T }>;
|
|
1844
1842
|
failed: Array<{ id: number; reason: any }>;
|
|
@@ -2301,12 +2299,12 @@ declare namespace FW {
|
|
|
2301
2299
|
initialize?();
|
|
2302
2300
|
onDestroy?();
|
|
2303
2301
|
onWeakNetWork?(): void;
|
|
2304
|
-
abstract onMessage(msg: any): void;
|
|
2305
2302
|
onHeart?(msg: any): Promise<boolean>;
|
|
2306
2303
|
onClose?(): void;
|
|
2307
2304
|
onOpen?(): void;
|
|
2308
2305
|
onError?(msg: any): void;
|
|
2309
2306
|
onTimeout?(): void;
|
|
2307
|
+
abstract onMessage(msg: any): void;
|
|
2310
2308
|
abstract getProtocolKey?(msg: any): string;
|
|
2311
2309
|
abstract onBeforeReceivingMessage?(msg: any): Promise<FW.SocketMessage>;
|
|
2312
2310
|
}
|
|
@@ -2317,7 +2315,8 @@ declare namespace FW {
|
|
|
2317
2315
|
public abstract initialize(): void;
|
|
2318
2316
|
public abstract onDestroy(): void;
|
|
2319
2317
|
}
|
|
2320
|
-
|
|
2318
|
+
|
|
2319
|
+
export class Http extends Service {
|
|
2321
2320
|
public initialize() {}
|
|
2322
2321
|
public onDestroy(): void {}
|
|
2323
2322
|
|
|
@@ -2342,7 +2341,6 @@ declare namespace FW {
|
|
|
2342
2341
|
|
|
2343
2342
|
declare namespace FW {
|
|
2344
2343
|
export class SocketMock {
|
|
2345
|
-
static createMockData<T>(msgId: string, data: T);
|
|
2346
2344
|
public static start(mockResponses: {}): void;
|
|
2347
2345
|
public static stop(): void;
|
|
2348
2346
|
}
|