/// <summary> /// Handle non-hub messages /// </summary> void signalRConnection_OnGeneralMessage(Connection manager, object data) { // For now, just create a Json string from the sent data again string reencoded = BestHTTP.JSON.Json.Encode(data); // and display it messages.Add("[Server Message] " + reencoded); }
private void Invoke(Hub hub, MethodCallMessage methodCall) { invokeResults.Add(string.Format("{0} client state index -> {1}", methodCall.Arguments[0], this.State["index"])); }
private void Joined(Hub hub, MethodCallMessage methodCall) { Dictionary <string, object> AuthInfo = methodCall.Arguments[2] as Dictionary <string, object>; messages.Add(string.Format("{0} joined at {1}\n\tIsAuthenticated: {2} IsAdmin: {3} UserName: {4}", methodCall.Arguments[0], methodCall.Arguments[1], AuthInfo["IsAuthenticated"], AuthInfo["IsAdmin"], AuthInfo["UserName"])); }
/// <summary> /// Called on server-sent non-hub messages. /// </summary> void signalRConnection_OnNonHubMessage(Connection manager, object data) { messages.Add("[Server Message] " + data.ToString()); }