fix(core): update
This commit is contained in:
@ -16,6 +16,10 @@ export interface ISmartsocketConstructorOptions {
|
||||
}
|
||||
|
||||
export class Smartsocket {
|
||||
/**
|
||||
* a unique id to detect server restarts
|
||||
*/
|
||||
public id = plugins.smartunique.shortId();
|
||||
public options: ISmartsocketConstructorOptions;
|
||||
public io: SocketIO.Server;
|
||||
public socketConnections = new Objectmap<SocketConnection>();
|
||||
@ -80,7 +84,7 @@ export class Smartsocket {
|
||||
funcName: functionNameArg
|
||||
},
|
||||
originSocketConnection: targetSocketConnectionArg,
|
||||
shortId: plugins.shortid.generate(),
|
||||
shortId: plugins.smartunique.shortId(),
|
||||
side: 'requesting'
|
||||
});
|
||||
const response: ISocketFunctionCallDataResponse<T> = await socketRequest.dispatch();
|
||||
|
@ -111,7 +111,7 @@ export class SmartsocketClient {
|
||||
const socketRequest = new SocketRequest<T>(this, {
|
||||
side: 'requesting',
|
||||
originSocketConnection: this.socketConnection,
|
||||
shortId: plugins.shortid.generate(),
|
||||
shortId: plugins.smartunique.shortId(),
|
||||
funcCallData: {
|
||||
funcName: functionNameArg,
|
||||
funcDataArg: dataArg
|
||||
|
@ -10,6 +10,7 @@ import * as smarthash from '@pushrocks/smarthash';
|
||||
import * as smartdelay from '@pushrocks/smartdelay';
|
||||
import * as smartexpress from '@pushrocks/smartexpress';
|
||||
import * as smartpromise from '@pushrocks/smartpromise';
|
||||
import * as smartunique from '@pushrocks/smartunique';
|
||||
|
||||
|
||||
export {
|
||||
@ -18,16 +19,15 @@ export {
|
||||
smarthash,
|
||||
smartdelay,
|
||||
smartexpress,
|
||||
smartpromise
|
||||
smartpromise,
|
||||
smartunique,
|
||||
};
|
||||
|
||||
// third party scope
|
||||
import * as shortid from 'shortid';
|
||||
import socketIo from 'socket.io';
|
||||
import socketIoClient from 'socket.io-client';
|
||||
|
||||
export {
|
||||
shortid,
|
||||
socketIo,
|
||||
socketIoClient
|
||||
};
|
||||
|
Reference in New Issue
Block a user