public int AsyncRequest(string inMethodName, object[] inParams, GbxCallCallbackHandler callbackHandler) { GbxCall gbxCall = new GbxCall(inMethodName, inParams) { Handle = --this.requests }; int num = XmlRpc.SendCall(this.tcpSocket, gbxCall); int result; lock (this) { if (num != 0) { if (callbackHandler != null) { this.callbackList.Add(num, callbackHandler); } result = num; } else { result = 0; } } return(result); }
/// <summary> /// Sends a Request and does not wait for a response of the server. /// The response will be written into a buffer or you can set a callback method /// that will be executed. /// </summary> /// <param name="inMethodName">The method to call.</param> /// <param name="inParams">Parameters describing your request.</param> /// <param name="callbackHandler">An optional delegate which is callen when the response is available otherwise set it to null.</param> /// <returns>Returns a handle to your request.</returns> public int AsyncRequest(string inMethodName, object[] inParams, GbxCallCallbackHandler callbackHandler) { // send the call and remember the handle ... GbxCall Request = new GbxCall(inMethodName, inParams); Request.Handle = --this.requests; int handle = XmlRpc.SendCall(this.tcpSocket, Request); lock (this) { if (handle != 0) { // register a callback on this request ... if (callbackHandler != null) { callbackList.Add(handle, callbackHandler); } // return handle id ... return(handle); } else { return(0); } } }
protected void asyncRequest(GbxCallCallbackHandler handler, String methodName, params object[] param) { if (param == null) { param = new object[] { } } ; this.client.AsyncRequest(methodName, param, handler); }
public static void asyncRequest(this XmlRpcClient client, GbxCallCallbackHandler handler, String methodName, params object[] param) { if (param == null) { param = new object[] { } } ; client.AsyncRequest(methodName, param, handler); }
protected void asyncRequest(String methodName, GbxCallCallbackHandler handler) { this.client.AsyncRequest(methodName, new object[] { }, handler); }
public static void asyncRequest(this XmlRpcClient client, String methodName, GbxCallCallbackHandler handler) { client.AsyncRequest(methodName, new object[] { }, handler); }
/// <summary> /// Sends a Request and does not wait for a response of the server. /// The response will be written into a buffer or you can set a callback method /// that will be executed. /// </summary> /// <param name="inMethodName">The method to call.</param> /// <param name="inParams">Parameters describing your request.</param> /// <param name="callbackHandler">An optional delegate which is callen when the response is available otherwise set it to null.</param> /// <returns>Returns a handle to your request.</returns> public int AsyncRequest(string inMethodName, object[] inParams, GbxCallCallbackHandler callbackHandler) { // send the call and remember the handle ... GbxCall Request = new GbxCall(inMethodName, inParams); Request.Handle = --this.requests; int handle = XmlRpc.SendCall(this.tcpSocket, Request); lock (this) { if (handle != 0) { // register a callback on this request ... if (callbackHandler != null) { callbackList.Add(handle, callbackHandler); } // return handle id ... return handle; } else { return 0; } } }