Files
game-server-watcher/node_modules/xmlrpc/lib/xmlrpc.js
Smith a5f3794527 include prod deps in vcs with some exceptions
* cloudno.de has problems installing new dependencies lately..
2022-06-30 22:59:51 +02:00

66 lines
1.4 KiB
JavaScript

var Client = require('./client')
, Server = require('./server')
, CustomType = require('./customtype')
, dateFormatter = require('./date_formatter')
var xmlrpc = exports
/**
* Creates an XML-RPC client.
*
* @param {Object} options - server options to make the HTTP request to
* - {String} host
* - {Number} port
* - {String} url
* - {Boolean} cookies
* @return {Client}
* @see Client
*/
xmlrpc.createClient = function(options) {
return new Client(options, false)
}
/**
* Creates an XML-RPC client that makes calls using HTTPS.
*
* @param {Object} options - server options to make the HTTP request to
* - {String} host
* - {Number} port
* - {String} url
* - {Boolean} cookies
* @return {Client}
* @see Client
*/
xmlrpc.createSecureClient = function(options) {
return new Client(options, true)
}
/**
* Creates an XML-RPC server.
*
* @param {Object}options - the HTTP server options
* - {String} host
* - {Number} port
* @return {Server}
* @see Server
*/
xmlrpc.createServer = function(options, callback) {
return new Server(options, false, callback)
}
/**
* Creates an XML-RPC server that uses HTTPS.
*
* @param {Object}options - the HTTP server options
* - {String} host
* - {Number} port
* @return {Server}
* @see Server
*/
xmlrpc.createSecureServer = function(options, callback) {
return new Server(options, true, callback)
}
xmlrpc.CustomType = CustomType
xmlrpc.dateFormatter = dateFormatter