blob: 4b1a3742efd36050320fae1bd0ae95d81edd52bf [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.newClient().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);
});
});
});