private Emitter MetReq(RTMethodRequest methodRequest) { Emitter emitter = connectionManager.Socket.Emit("MET_REQ", WeborbSerializationHelper.Serialize(methodRequest.ToArgs())); Log.log(Backendless.BACKENDLESSLOG, "metReq called"); return(emitter); }
private void Resubscribe() { foreach (RTSubscription rtSubscription in subscriptions.Values) { SubOn(rtSubscription); } RTMethodRequest methodRequest = null; #if NET_35 if (methodsToSend.Count > 0) { methodRequest = methodsToSend.Dequeue(); } #else methodsToSend.TryDequeue(out methodRequest); #endif while (methodRequest != null) { MetReq(methodRequest); #if NET_35 if (methodsToSend.Count > 0) { methodRequest = methodsToSend.Dequeue(); } #else methodsToSend.TryDequeue(out methodRequest); #endif } }
public void Invoke(RTMethodRequest methodRequest) { sentRequests[methodRequest.Id] = methodRequest; if (connectionManager.IsConnected()) { MetReq(methodRequest); } else { methodsToSend.Enqueue(methodRequest); } }
public void UserLoggedIn(string userToken) { if (connectionManager.IsConnected()) { var rtCallback = new RTCallback <Object>(result => { Log.log(Backendless.BACKENDLESSLOG, "user logged in/out successfully"); }, error => { Log.log(Backendless.BACKENDLESSLOG, String.Format("got error {0}", error)); }); RTMethodRequest methodRequest = new RTMethodRequest(MethodTypes.SET_USER_TOKEN, rtCallback); methodRequest.PutOption("userToken", userToken); Invoke(methodRequest); } }
public void Invoke(RTMethodRequest methodRequest) { new Thread(() => rtClient.Invoke(methodRequest)).Start(); }
public void Invoke(RTMethodRequest methodRequest) { throw new NoSocketIOException(); }