Example #1
0
        public RemoteNode(IPEndPoint remoteEndPoint, Logger logger)
        {
            this.logger         = logger;
            this.remoteEndPoint = remoteEndPoint;

            this.socket   = new Socket(remoteEndPoint.AddressFamily, SocketType.Stream, ProtocolType.Tcp);
            this.receiver = new RemoteReceiver(this, this.socket, persistent: false, logger: this.logger);
            this.sender   = new RemoteSender(this.socket, this.logger);

            WireNode();
        }
Example #2
0
        public RemoteNode(Socket socket)
        {
            this.socket      = socket;
            this.isConnected = true;

            this.localEndPoint  = (IPEndPoint)socket.LocalEndPoint;
            this.remoteEndPoint = (IPEndPoint)socket.RemoteEndPoint;

            this.receiver = new RemoteReceiver(this, this.socket, persistent: false, logger: this.logger);
            this.sender   = new RemoteSender(this.socket, this.logger);

            WireNode();
        }
Example #3
0
        public Peer(IPEndPoint remoteEndPoint, bool isSeed)
        {
            RemoteEndPoint = remoteEndPoint;
            IsSeed = isSeed;

            this.socket = new Socket(remoteEndPoint.AddressFamily, SocketType.Stream, ProtocolType.Tcp);
            Receiver = new RemoteReceiver(this, this.socket, persistent: false);
            Sender = new RemoteSender(this.socket);

            this.blockMissCountMeasure = new CountMeasure(TimeSpan.FromMinutes(10));

            WireNode();
        }
Example #4
0
        public Peer(IPEndPoint remoteEndPoint, bool isSeed, Logger logger)
        {
            this.logger         = logger;
            this.remoteEndPoint = remoteEndPoint;
            this.isSeed         = isSeed;

            this.socket   = new Socket(remoteEndPoint.AddressFamily, SocketType.Stream, ProtocolType.Tcp);
            this.receiver = new RemoteReceiver(this, this.socket, persistent: false, logger: this.logger);
            this.sender   = new RemoteSender(this.socket, this.logger);

            this.blockMissCountMeasure = new CountMeasure(TimeSpan.FromMinutes(10));

            WireNode();
        }
Example #5
0
        public Peer(Socket socket, bool isSeed)
        {
            this.socket = socket;
            this.IsConnected = true;

            LocalEndPoint = (IPEndPoint)socket.LocalEndPoint;
            RemoteEndPoint = (IPEndPoint)socket.RemoteEndPoint;

            Receiver = new RemoteReceiver(this, this.socket, persistent: false);
            Sender = new RemoteSender(this.socket);

            this.blockMissCountMeasure = new CountMeasure(TimeSpan.FromMinutes(10));

            WireNode();
        }
Example #6
0
        public Peer(Socket socket, bool isSeed, Logger logger)
        {
            this.logger      = logger;
            this.socket      = socket;
            this.isConnected = true;

            this.localEndPoint  = (IPEndPoint)socket.LocalEndPoint;
            this.remoteEndPoint = (IPEndPoint)socket.RemoteEndPoint;

            this.receiver = new RemoteReceiver(this, this.socket, persistent: false, logger: this.logger);
            this.sender   = new RemoteSender(this.socket, this.logger);

            this.blockMissCountMeasure = new CountMeasure(TimeSpan.FromMinutes(10));

            WireNode();
        }