Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use Proxy to intercept and pass all method calls #13

Closed
tshemsedinov opened this issue Apr 23, 2018 · 3 comments
Closed

Use Proxy to intercept and pass all method calls #13

tshemsedinov opened this issue Apr 23, 2018 · 3 comments

Comments

@tshemsedinov
Copy link
Member

Proposed client syntax:

const client = metacom.connect('tcp://domain.name:2000');
const app = client.application('applicationName');
app.methodName(par1, par2, par3, (err, data) => {
  console.dir({ err, data });
});
@o-rumiantsev
Copy link
Member

Server applications have multiple interfaces(according to Impress Application Server).
I think it should look like this:

app.interfaceName.methodName(...)

@tshemsedinov
Copy link
Member Author

Yes, so better solution:

const client = metacom.connect('tcp://domain.name:2000');
const api = client.api('applicationName', 'apiName', [apiVersion]);
api.methodName(par1, par2, par3, (err, data) => {
  console.dir({ err, data });
});

because each interface may have different versions (latest by default).

@tshemsedinov
Copy link
Member Author

Closed in favour of new version 0.1.x implementing new specification

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants