示例#1
0
            public InternalBitChatService(BitChatService service, BitChatProfile profile, Certificate[] trustedRootCertificates, SecureChannelCryptoOptionFlags supportedCryptoOptions)
            {
                _service = service;
                _profile = profile;
                _trustedRootCertificates = trustedRootCertificates;
                _supportedCryptoOptions = supportedCryptoOptions;

                _connectionManager = new ConnectionManager(_profile.LocalEP, ChannelRequest);

                LocalPeerDiscovery.StartListener(41733);
                _localDiscovery = new LocalPeerDiscovery(_connectionManager.LocalEP.Port);
                _localDiscovery.PeerDiscovered += _localDiscovery_PeerDiscovered;

                _profile.LocalEP = _connectionManager.LocalEP;
            }
示例#2
0
 public Connection(Stream baseStream, BinaryID remotePeerID, IPEndPoint remotePeerEP, ConnectionManager connectionManager, ChannelRequest requestHandler)
 {
     _baseStream = baseStream;
     _remotePeerID = remotePeerID;
     _remotePeerEP = remotePeerEP;
     _connectionManager = connectionManager;
     _requestHandler = requestHandler;
 }