Ejemplo n.º 1
0
        public Server()
        {
            tcpSocket = new Socket(AddressFamily.InterNetwork, SocketType.Stream, ProtocolType.Tcp);
            var tcpEndPoint = new IPEndPoint(IPAddress.Any, port);

            tcpSocket.Bind(tcpEndPoint);
            tcpSocket.Listen(6);
            AddFilesAndThemTime();
            Action run = Run;

            clientConect = new ClientConector(filesPathsAndTimeCreateOrChangeFiles, run);
            fileDet      = new FilesDetector(filesPathsAndTimeCreateOrChangeFiles, clientConect);
            Run();
            Detect();
        }
Ejemplo n.º 2
0
 public FilesDetector(List <FileInformation> filesPathsAndTimeCreateOrChangeFiles, ClientConector clientConect)
 {
     this.filesPathsAndTimeCreateOrChangeFiles = filesPathsAndTimeCreateOrChangeFiles;
     this.clientConect = clientConect;
 }