Пример #1
0
 public SecureDownloader(Server server, string token,
     NotifyReceiveComplete completeEvent, NotifyErrorReceiving errorEvent,
     Stream fileStream)
     : base(server, token, completeEvent, errorEvent)
 {
     this.fileStream = fileStream;
 }
Пример #2
0
 public SecureChannel(Server server, string token,
     NotifyReceiveComplete completeEvent, NotifyErrorReceiving errorEvent)
 {
     if (certificate == null)
     {
         System.Console.WriteLine(Directory.GetCurrentDirectory());
         certificate = new X509Certificate2("Certificates\\certificate.pfx", "malnati");
     }
     this.token = token;
     this.server = server;
     this.listener = new TcpListener(IPAddress.Any,
         UsefullMethods.GetAvailablePort(30000));
     this.thread = new Thread(this.ThreadCode);
     this.errorEvent = errorEvent;
     this.completeEvent = completeEvent;
     this.start = new AutoResetEvent(false);
     this.clientConnected = new AutoResetEvent(false);
     this.thread.Start();
 }
Пример #3
0
 public SecureUploader(Server server, string token,
     NotifyReceiveComplete completeEvent, NotifyErrorReceiving errorEvent)
     : base(server, token, completeEvent, errorEvent)
 {
 }