コード例 #1
0
        public WebServer(int port, RadioShackMicroServo servo, Buzzer buzzer, FeederTrainingBeep training, Blinker blinker)
        {
            _servo    = servo;
            _buzzer   = buzzer;
            _training = training;
            _blinker  = blinker;

            _socket = new Socket(AddressFamily.InterNetwork, SocketType.Stream, ProtocolType.Tcp);
            _socket.Bind(new IPEndPoint(IPAddress.Any, port));
            _socket.Listen(Backlog);

            _listenerThread = new Thread(new ThreadStart(ListenForClients));
            _listenerThread.Start();
        }
コード例 #2
0
 public Feeder(FeederTrainingBeep beep, Blinker blinker, RadioShackMicroServo servo)
 {
     _beep    = beep;
     _blinker = blinker;
     _servo   = servo;
 }