public SocketServerControl()
 {
     appServer   = new MyServer();
     superConfig = new SuperSocketConfig();
     clientList  = new List <Client>();
     deviceList  = new List <Device>();
 }
        /// <summary>
        /// 启动socket 监听
        /// </summary>
        public static void StartServer()
        {
            appServer   = new MyServer();
            superConfig = new SuperSocketConfig();
            //Setup the appServer
            if (!appServer.Setup(1001)) //Setup with listening port
            {
                LogHelper.Log.Info("Failed to setup!");
                return;
            }

            //Try to start the appServer
            if (!appServer.Start())
            {
                LogHelper.Log.Info("Failed to start!");
                return;
            }
            appServer.NewSessionConnected += MyServer_NewSessionConnected;
            appServer.SessionClosed       += MyServer_SessionClosed;

            LogHelper.Log.Info("SuperSocket Server Start Success.....");
        }
 public SocketServerBinary()
 {
     appServer   = new MyServer();
     superConfig = new SuperSocketConfig();
 }