import { Cote, Requester, PeersOnline, Subscriber, PeersOffline} from "../src"
import { RandomService} from './responder-publisher';
import { ServiceNodeInfo } from "../src/interfaces";
export class TestRequest extends Cote(__filename) {
@Requester()
r : RandomService
@PeersOnline(RandomService)
private _(info : ServiceNodeInfo){
console.log('Random service on');
}
@PeersOffline(RandomService)
private __(info : ServiceNodeInfo){
console.log('Random service off');
}
}
(async()=>{
const x = new TestRequest();
await x.ready;
console.log(await x.r.plus(45,78));
console.log(x.getInfo(RandomService))
console.log(x.getInfo())
})();