XIMOTIAN / npc_dart

Near Procedure Call

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Near Procedure Call.

Usage

// Create a NPC
final npc = NPC();
npc.send = (message) async{
    // send message
};
//call when message received:
await npc.receive(message);
// register handle
npc.on('ping', (param, cancelable, notify)=>'pong');
// emit
await npc.emit('say', 'hello');
// deliver
final r = await npc.deliver('download', param: '/path', onNotify: (param){

});

Try the example for more usage.

About

Near Procedure Call

License:BSD 3-Clause "New" or "Revised" License


Languages

Language:Dart 100.0%