blob: 99e8a03aa9bc7e3989b93da5e8e3f446383384d8 [file] [log] [blame]
// Copyright 2015 The Vanadium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
var vanadium = require('vanadium');
vanadium.init(function(err, rt) {
if (err) throw err;
var ctx = rt.getContext();
console.log('Binding to service');
rt.getClient().bindTo(ctx, 'pingpong', function(err, s) {
if (err) throw err;
console.log('Pinging');
s.ping(ctx, 'PING', function(err, pong) {
if (err) throw err;
console.log(pong);
process.exit(0);
});
});
});