protected override void OnStart(string[] args)
        {
            InitConfig();
            LogHelper.Log.Info("on start...");
            host = new ServiceHost(typeof(FigKeyLoggerService));
            //socketServer = new SocketHelper(port, deviceList, clientList);
            //socketServer = new FigKeySocketServer(figkeyConfig, deviceList, clientList);
            SocketServerControl.StartServer();


            host.Opening += Host_Opening;
            host.Opened  += Host_Opened;
            host.Closing += Host_Closing;
            host.Closed  += Host_Closed;
            host.Faulted += Host_Faulted;

            host.Open(TimeSpan.FromSeconds(25));
        }
示例#2
0
 private void button3_Click(object sender, EventArgs e)
 {
     //启动服务
     SocketServerControl.StartServer();
 }