Example #1
0
 private void TransmitPacket(SSH2TransmissionPacket packet) {
     _allowedDataSize -= packet.DataWriter.Length - SSH2TransmissionPacket.INITIAL_OFFSET;
     _connection.TransmitPacket(packet);
 }
Example #2
0
 private SSH2TransmissionPacket OpenPacket() {
     SSH2TransmissionPacket packet = _packet;
     if (packet == null) {
         packet = _packet = new SSH2TransmissionPacket();
     }
     packet.Open();
     return packet;
 }
Example #3
0
 internal DataFragment SynchronizedTransmitPacket(SSH2TransmissionPacket packet) {
     lock (_transmitSync) {
         DataFragment data = packet.Close(_tCipher, _tMAC, _tSequence++);
         return _packetReceiver.SendAndWaitResponse(data);
     }
 }
Example #4
0
 internal void TransmitPacket(SSH2TransmissionPacket packet) {
     lock (_transmitSync) {
         DataFragment data = packet.Close(_tCipher, _tMAC, _tSequence++);
         _stream.Write(data.Data, data.Offset, data.Length);
     }
 }
Example #5
0
 public KeyExchanger(SSH2Connection con, byte[] sessionID) {
     _connection = con;
     _param = con.Param;
     _cInfo = (SSH2ConnectionInfo)con.ConnectionInfo;
     _sessionID = sessionID;
     _status = Status.INITIAL;
     _packet = new SSH2TransmissionPacket();
 }
Example #6
0
 private SSH2TransmissionPacket OpenPacket() {
     SSH2TransmissionPacket packet = _transmissionPacket ??
                                    (_transmissionPacket = new SSH2TransmissionPacket());
     packet.Open();
     return packet;
 }