//异步发送 public void send(string sendData, LuaFunction lf, LuaFunction ef) { AsyncInvokeContext aic = new AsyncInvokeContext(this, sendData); aic.setLFunction(lf); aic.setLerrorFunction(ef); //Debug.Log("C#::HttpLuaClient::asyncSend(" + sendData + ", " + lf.ToString() + ", " + ef.ToString() + ")"); aic.Invoke(); }
//------------------------------------------------- //异步发送 public bool send(string sendData, LuaFunction lf) { AsyncInvokeContext aic = new AsyncInvokeContext(this, sendData); aic.setLFunction(lf); //Debug.Log("C#::HttpLuaClient::asyncSend(" + sendData + ", " + lf + ")"); aic.Invoke(); return(true); }
private void Invoke(string functionName, object[] arguments, HproseCallback callback, HproseErrorEvent errorEvent, Type returnType, bool byRef, HproseResultMode resultMode) { if (errorEvent == null) { errorEvent = OnError; } AsyncInvokeContext context = new AsyncInvokeContext(this, functionName, arguments, callback, errorEvent, returnType, byRef, resultMode); try { BeginGetOutputStream(new AsyncCallback(context.GetOutputStream), GetInvokeContext()); } catch (Exception e) { if (errorEvent != null) { errorEvent(functionName, e); } } }
public void Invoke <T>(string functionName, object[] arguments, HproseCallback <T> callback, HproseErrorEvent errorEvent, bool byRef) { if (errorEvent == null) { errorEvent = OnError; } AsyncInvokeContext <T> context = new AsyncInvokeContext <T>(this, functionName, arguments, callback, errorEvent, byRef); try { BeginGetOutputStream(new AsyncCallback(context.GetOutputStream), GetInvokeContext()); } catch (Exception e) { if (errorEvent != null) { errorEvent(functionName, e); } } }