Esempio n. 1
0
        public static void Main(string[] args)
        {
            //Soket nesnesini oluşturuyoruz
            //her Do metodunu çalıştırdığımızda farklı işlemler çalışacaktır.

            Soket s = new Soket(8080);

            s.Do();
            s.Do();
            s.Do();


            Console.ReadKey();
        }
Esempio n. 2
0
 public void Handle(Soket s)
 {
     Console.WriteLine("{0} Port soket Kapatıldı.", s.Port);
     /*Context birdahaki çalışmasında SoketStateAc nesnesine göre çalışacak*/
     s.State = new SoketStateAc();
 }
Esempio n. 3
0
 public void Handle(Soket s)
 {
     Console.WriteLine("{0} Port soket Dinleniyor.", s.Port);
     /*Context birdahaki çalışmasında SoketStateKapat nesnesine göre çalışacak*/
     s.State = new SoketStateKapat();
 }