Tabnine Logo For Javascript
xmlrpc
Code IndexAdd Tabnine to your IDE (free)

How to use xmlrpc

Best JavaScript code snippets using xmlrpc(Showing top 5 results out of 315)

origin: vankasteelj/opensubtitles-api

call(method, args) {
    return new Promise((resolve, reject) => {
      this.client.methodCall(method, [...args], (err, data) => {
        if (err) return reject(this.handleError(err))
        resolve(data)
      })
    })
  }
origin: RethinkRobotics-opensource/rosnodejs

constructor(host, port) {
  this._xmlrpcClient = xmlrpc.createClient({host: host, port: port});
 }
origin: vankasteelj/opensubtitles-api

constructor(endpoint, ssl) {
    const UA = pjson.name + ' v' + pjson.version
    const uri = endpoint || (ssl ? url_ssl : url)
    const req = URIjs(uri)._parts
    const secure = req.protocol === 'https'

    const opts = {
      host: req.hostname,
      port: req.port || (secure ? 443 : 80),
      path: req.path,
      headers: {
        'User-Agent': UA
      }
    }

    this.client = secure ? xmlrpc.createSecureClient(opts) : xmlrpc.createClient(opts)
  }
origin: RethinkRobotics-opensource/rosnodejs

const server = xmlrpc.createServer({port: xmlrpcPort}, () => {
 const {port} = server.httpServer.address();
 this._debugLog.debug('Slave API Listening on port ' + port);
 this._xmlrpcPort = port;
});
server.on('NotFound', (method, params) => {
 this._log.warn('Method ' + method + ' does not exist: ' + params);
});
server.on('requestTopic', this._handleTopicRequest.bind(this));
server.on('publisherUpdate', this._handlePublisherUpdate.bind(this));
server.on('paramUpdate', this._handleParamUpdate.bind(this));
server.on('getPublications', this._handleGetPublications.bind(this));
server.on('getSubscriptions', this._handleGetSubscriptions.bind(this));
server.on('getPid', this._handleGetPid.bind(this));
server.on('shutdown', this._handleShutdown.bind(this));
server.on('getMasterUri', this._handleGetMasterUri.bind(this));
server.on('getBusInfo', this._handleGetBusInfo.bind(this));
server.on('getBusStats', this._handleGetBusStats.bind(this));
server.httpServer.on('clientError', (err, socket) => {
 this._log.error('XMLRPC Server socket error: %j', err);
});
origin: RethinkRobotics-opensource/rosnodejs

requestTopic(callerId, topic, protocols) {
  let data = [callerId, topic, protocols];
  return new Promise((resolve, reject) => {
   this._xmlrpcClient.methodCall('requestTopic', data, (err, resp) => {
    if (err || resp[0] !== 1) {
     reject(err, resp);
    }
    else {
   resolve(resp);
    }
   });
  });
 }
xmlrpc(npm)

JSDoc

A pure JavaScript XML-RPC client and server.

Most used xmlrpc functions

  • Client.methodCall
  • createClient
  • Server.httpServer
  • Server.on
  • createSecureClient

Popular in JavaScript

  • chalk
    Terminal string styling done right
  • ms
    Tiny millisecond conversion utility
  • minimist
    parse argument options
  • axios
    Promise based HTTP client for the browser and node.js
  • request
    Simplified HTTP request client.
  • bluebird
    Full featured Promises/A+ implementation with exceptionally good performance
  • body-parser
    Node.js body parsing middleware
  • express
    Fast, unopinionated, minimalist web framework
  • glob
    a little globber
  • Best IntelliJ plugins
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJavascript Code Index
Get Tabnine for your IDE now