public RemoteNode(IPEndPoint remoteEndPoint) { this.remoteEndPoint = remoteEndPoint; this.socket = new Socket(remoteEndPoint.AddressFamily, SocketType.Stream, ProtocolType.Tcp); this.receiver = new RemoteReceiver(this.socket, persistent: false); this.sender = new RemoteSender(this.socket); WireNode(); }
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.socket, persistent: false); this.sender = new RemoteSender(this.socket); WireNode(); }
public Peer(IPEndPoint remoteEndPoint, bool isSeed, bool isIncoming) { RemoteEndPoint = remoteEndPoint; IsSeed = isSeed; IsIncoming = isIncoming; this.socket = new Socket(remoteEndPoint.AddressFamily, SocketType.Stream, ProtocolType.Tcp); Receiver = new RemoteReceiver(this, this.socket); Sender = new RemoteSender(this, this.socket); this.blockMissCountMeasure = new CountMeasure(TimeSpan.FromMinutes(10)); WireNode(); }
public Peer(Socket socket, bool isSeed, bool isIncoming) { this.socket = socket; this.IsConnected = true; IsIncoming = isIncoming; LocalEndPoint = (IPEndPoint)socket.LocalEndPoint; RemoteEndPoint = (IPEndPoint)socket.RemoteEndPoint; Receiver = new RemoteReceiver(this, this.socket); Sender = new RemoteSender(this, this.socket); this.blockMissCountMeasure = new CountMeasure(TimeSpan.FromMinutes(10)); WireNode(); }