public ConsumerNetworkModule(int port)
        {
            SecureAcceptor acceptor = new SecureAcceptor(new TCPAcceptor(port, 10));

            acceptor.Crypto = CryptoType.EC25519;
            acceptor.SecureConnectionEstablished += OnProducerConnected;
            acceptor.Run();
        }
Exemple #2
0
        static void StartReceiving(string receiveFolder, int port)
        {
            if (acceptor != null)
            {
                acceptor.Stop();
            }

            fileReceiver = new FileReceiver(receiveFolder);
            fileReceiver.Logger.LogLevel = logger.LogLevel;

            acceptor        = new SecureAcceptor(new TCPAcceptor(port, 10));
            acceptor.Logger = logger;
            acceptor.Crypto = CryptoType.EC25519;
            acceptor.SecureConnectionEstablished += OnSecureClientConnect;
            acceptor.Run();
        }