fix(core): update

This commit is contained in:
2021-01-22 15:13:05 +00:00
parent 912b9bad51
commit a23c5a0fba
4 changed files with 26 additions and 32 deletions

View File

@@ -69,12 +69,15 @@ export class TypedSocket {
serverUrlArg: string,
aliasArg = 'clientArg'
): Promise<TypedSocket> {
const domain = new plugins.smartstring.Domain(serverUrlArg);
const smartsocketClient = new plugins.smartsocket.SmartsocketClient({
alias: aliasArg,
role: publicRoleName,
password: publicRolePass,
port: 3000,
url: serverUrlArg,
port: domain.port || 3000,
url: `${domain.nodeParsedUrl.protocol}//${domain.nodeParsedUrl.host}`,
autoReconnect: true,
});
smartsocketClient.addSocketFunction(