private void TransmitWriter(SSH2DataWriter wr) { int o = wr.Length; wr.SetOffset(0); wr.WriteInt32(o - 4); //length of int32 _channel.Transmit(wr.UnderlyingBuffer, 0, o); }