Пример #1
0
        /// <summary>
        /// Constructor.
        /// </summary>
        public P2PDirectProcessor(
            ConnectivitySettings connectivitySettings,
            P2PVersion p2pVersion,
            Guid reply, Guid authNonce, bool isNeedHash,
            P2PSession p2pMessageSession,
            NSMessageHandler nsMessageHandler)
        {
            Trace.WriteLineIf(Settings.TraceSwitch.TraceInfo, "Constructing object - " + p2pVersion, GetType().Name);

            Processor = new TcpSocketMessageProcessor(connectivitySettings, new P2PDCPool());

            this.version = p2pVersion;
            this.nonce = authNonce;
            this.reply = reply;
            this.needHash = isNeedHash;
            this.startupSession = p2pMessageSession;
            this.nsMessageHandler = nsMessageHandler;
        }
Пример #2
0
 protected internal NSMessageProcessor(ConnectivitySettings connectivitySettings)
 {
     if (connectivitySettings.HttpPoll)
     {
         Processor = new HttpSocketMessageProcessor(connectivitySettings, new NSMessagePool());
     }
     else
     {
         Processor = new TcpSocketMessageProcessor(connectivitySettings, new NSMessagePool());
     }
 }