Exemplo n.º 1
0
        protected override void OnStart(string[] args)
        {
            string port = ini.ReadIni("Config", "Port");

            socketServer.NewMessage2Event += SocketServer_NewMessage2Event;
            SimpleLogHelper.Instance.WriteLog(LogType.Info, socketServer.Listen(port));
        }
Exemplo n.º 2
0
 /// <summary>
 /// 服务器侦听
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 private void btnServerListen_Click(object sender, RoutedEventArgs e)
 {
     UDPServer.Listen("8080");
     this.UDPServer.NewMessage2Event += UDPServer_NewMessage2Event;
 }