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