Exemplo n.º 1
0
 private void TransmitPacket(SSH2TransmissionPacket packet) {
     _allowedDataSize -= packet.DataWriter.Length - SSH2TransmissionPacket.INITIAL_OFFSET;
     _connection.TransmitPacket(packet);
 }
Exemplo n.º 2
0
 private SSH2TransmissionPacket OpenPacket() {
     SSH2TransmissionPacket packet = _packet;
     if (packet == null) {
         packet = _packet = new SSH2TransmissionPacket();
     }
     packet.Open();
     return packet;
 }
Exemplo n.º 3
0
 internal DataFragment SynchronizedTransmitPacket(SSH2TransmissionPacket packet) {
     lock (_transmitSync) {
         DataFragment data = packet.Close(_tCipher, _tMAC, _tSequence++);
         return _packetReceiver.SendAndWaitResponse(data);
     }
 }
Exemplo n.º 4
0
 internal void TransmitPacket(SSH2TransmissionPacket packet) {
     lock (_transmitSync) {
         DataFragment data = packet.Close(_tCipher, _tMAC, _tSequence++);
         _stream.Write(data.Data, data.Offset, data.Length);
     }
 }
Exemplo n.º 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();
 }
Exemplo n.º 6
0
 private SSH2TransmissionPacket OpenPacket() {
     SSH2TransmissionPacket packet = _transmissionPacket ??
                                    (_transmissionPacket = new SSH2TransmissionPacket());
     packet.Open();
     return packet;
 }