Esempio n. 1
0
        private void btnListen_Click(object sender, RoutedEventArgs e)
        {
            btnListen.Content = "Server pokrenut";

            IPAddress ipAddr = IPAddress.Parse(ipAdress);

            ChatServer mainServer = new ChatServer(ipAddr);

            ChatServer.StatusChanged += new StatusChangedEventHandler(mainServer_StatusChanged);

            mainServer.StartListening();

            txtLog.Items.Add("Cekam zahtjeve klijenata...\r\n");
        }
 private void ChatServet_Closing(object sender, System.ComponentModel.CancelEventArgs e)
 {
     ChatServer.RequestStop();
     Application.Current.Shutdown();
 }