public ProtocolLogger (Stream stream) { if (stream == null) throw new ArgumentNullException (nameof (stream)); this.stream = stream; }