Example #1
0
 public WSListener()
 {
     instance = this;
     Server.Start(Socket =>
     {
         Socket.OnOpen    = () => Connections.Add(Socket);
         Socket.OnClose   = () => Connections.Remove(Socket);
         Socket.OnMessage = Message =>
         {
             HandleMessage(Socket, Message);
         };
     });
 }
Example #2
0
        static void Main(string[] args)
        {
            if (args.Length > 0)
            {
                if (args[0] == "updated")
                {
                    try
                    {
                        System.IO.File.Delete(args[1]);
                    }
                    catch
                    {
                    }
                }
            }

            ApplicationManager appman = new ApplicationManager();
            WSListener         dam    = new WSListener();

            System.Windows.Forms.Application.Run();
        }