コード例 #1
0
ファイル: Assert.cs プロジェクト: thomaspatrick/StateFlux
 static public void ThrowIfFalse(bool flag, string msg, AppWebSocketBehavior behavior)
 {
     if (!flag)
     {
         ThrowError(msg, behavior);
     }
 }
コード例 #2
0
ファイル: Assert.cs プロジェクト: thomaspatrick/StateFlux
 static public void ThrowIfNotNull(object obj, string msg, AppWebSocketBehavior behavior)
 {
     if (obj != null)
     {
         ThrowError(msg, behavior);
     }
 }
コード例 #3
0
ファイル: Assert.cs プロジェクト: thomaspatrick/StateFlux
        static private void LogMessage(string message, AppWebSocketBehavior behavior)
        {
            Player currentPlayer = behavior.GetCurrentSessionPlayer();
            string playerName    = currentPlayer != null ? currentPlayer.Name : "unknown";
            string connection    = "";

            try { connection = behavior.Context.UserEndPoint.ToString(); } catch { };
            Console.WriteLine($"{DateTime.Now},{connection},{playerName},{message}");
        }
コード例 #4
0
 public MessageHandler(AppWebSocketBehavior serviceBehavior)
 {
     _websocket = serviceBehavior;
     _server    = Server.Instance;
 }
コード例 #5
0
 public GuestRequestFullStateMessageHandler(AppWebSocketBehavior serviceBehavior) : base(serviceBehavior)
 {
 }
コード例 #6
0
 public AuthenticationHandler(AppWebSocketBehavior serviceBehavior) : base(serviceBehavior)
 {
 }
コード例 #7
0
 public GameCommandChangeHandler(AppWebSocketBehavior serviceBehavior) : base(serviceBehavior)
 {
 }
コード例 #8
0
ファイル: Assert.cs プロジェクト: thomaspatrick/StateFlux
 static private void ThrowError(string msg, AppWebSocketBehavior behavior)
 {
     LogMessage($"{msg},{Environment.StackTrace}", behavior);
     throw new Exception(msg);
 }
コード例 #9
0
 public ChatMessageHandler(AppWebSocketBehavior serviceBehavior) : base(serviceBehavior)
 {
 }
コード例 #10
0
 public StateChangeMessageHandler(AppWebSocketBehavior serviceBehavior) : base(serviceBehavior)
 {
 }
コード例 #11
0
 public MiceChangeHandler(AppWebSocketBehavior serviceBehavior) : base(serviceBehavior)
 {
 }