New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

abi-rpc

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

abi-rpc

An abstract bidirectional RPC framework.

latest
Source
npmnpm
Version
0.0.2
Version published
Maintainers
1
Created
Source

ABI-RPC

An abstract bidirectional RPC framework.

Easy to use

class ServerHander {
    say(message: string) {
        console.log('message from client:', message)
    }
    echo(message:string){
        console.log('echo:', message)
        return message;
    }
}
class ClientHander {
    test(message: string) {
        console.log('message from server :', message)
    }
}
let server:ABIRPC<ClientHander>;

const client = new ABIRPC<ServerHander>(x=>server.handle(x), new ClientHander);

server = new ABIRPC<ClientHander>(x=>client.handle(x), new ServerHander);
server.call('test', 'hello');
client.call('say', 'say message');
client.call('echo', 'echo message').then(x=>console.log('echo result',x));

Keywords

abstract

FAQs

Package last updated on 06 Jun 2022

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts