///<summary>Constructor with port and address.</summary> ///<remarks>This constructor sets up a TcpListener listening on the ///given port and address. It also calls a Thread on the method StartListen().</remarks> ///<param name="address"><c>IPAddress</c> value of the address to listen on.</param> ///<param name="port"><c>Int</c> value of the port to listen on.</param> public XmlRpcServer(IPAddress address, int port) { _port = port; _address = address; _handlers = new Hashtable(); _system = new XmlRpcSystemObject(this); _wc = new WaitCallback(WaitCallback); }
/// <summary>Constructor with port and address.</summary> /// <remarks> /// This constructor sets up a TcpListener listening on the /// given port and address. It also calls a Thread on the method StartListen(). /// </remarks> /// <param name="address"><c>IPAddress</c> value of the address to listen on.</param> /// <param name="port"><c>Int</c> value of the port to listen on.</param> public XmlRpcServer(IPAddress address, int port) { _port = port; _address = address; _handlers = new Hashtable(); _system = new XmlRpcSystemObject(this); _wc = WaitCallback; }
/// <summary>Invoke a method on a named handler.</summary> /// <param name="objectName"><c>String</c> The name of the handler.</param> /// <param name="methodName"><c>String</c> The name of the method to invoke on the handler.</param> /// <param name="parameters"><c>IList</c> The parameters to invoke the method with.</param> /// <seealso cref="XmlRpcSystemObject.Invoke" /> public object Invoke(string objectName, string methodName, IList parameters) { var target = _handlers[objectName]; if (target == null) { throw new XmlRpcException(XmlRpcErrorCodes.SERVER_ERROR_METHOD, XmlRpcErrorCodes.SERVER_ERROR_METHOD_MSG + ": Object " + objectName + " not found"); } return(XmlRpcSystemObject.Invoke(target, methodName, parameters)); }
//The constructor which make the TcpListener start listening on the //given port. It also calls a Thread on the method StartListen(). public XmlRpcServer(int port) { _port = port; _handlers = new Hashtable(); _system = new XmlRpcSystemObject(this); }