节点信息类¶
请求节点信息¶
Node.JS Example¶
var Remote = require('jingtum-lib').Remote;
var remote = new Remote({server: 'ws://ts5.jingtum.com:5020', local_sign:true});
remote.connect(function (err, result) {
if(err) return console.log('err: ', err);
var req = remote.requestServerInfo();
req.submit(function (err1, result1) {
if(err1) return console.log('err1: ', err1);
console.log('server info: ', result1);
})
});
C# Example¶
var remote = new Remote(@"ws://ts5.jingtum.com:5020", true);
remote.Connect(result =>
{
if(result.Exception != null)
{
Console.Write(result.Exception.Message);
}
else
{
var req = remote.RequestServerInfo();
req.Submit(reqResult =>
{
Console.Write(reqResult.Message);
// get result from reqResult.Result
});
}
});