public PeerContext(ILogger logger, IEventBus eventBus, PeerConnectionDirection direction, string peerId, EndPoint localEndPoint, EndPoint publicEndPoint, EndPoint remoteEndPoint, INetworkMessageWriter messageWriter) { this.logger = logger; this.eventBus = eventBus; Direction = direction; PeerId = peerId; this.messageWriter = messageWriter; LocalEndPoint = localEndPoint.AsIPEndPoint(); PublicEndPoint = publicEndPoint.AsIPEndPoint(); RemoteEndPoint = remoteEndPoint.AsIPEndPoint(); }