ConnectionState.cs 1.0 KB

123456789101112131415161718192021222324
  1. /* Copyright (C) 2012-2016 Tal Aloni <tal.aloni.il@gmail.com>. All rights reserved.
  2. *
  3. * You can redistribute this program and/or modify it under the terms of
  4. * the GNU Lesser Public License as published by the Free Software Foundation,
  5. * either version 3 of the License, or (at your option) any later version.
  6. */
  7. using System;
  8. using System.Collections.Generic;
  9. using System.Text;
  10. namespace ISCSI.Client
  11. {
  12. public class ConnectionState
  13. {
  14. // Session parameters:
  15. public ulong ISID; // Initiator Session ID
  16. // Connection parameters:
  17. public ushort CID; // connection ID, generated by the initiator
  18. public const int ReceiveBufferSize = 131072; // Note: FirstBurstLength, MaxBurstLength and MaxRecvDataSegmentLength put a cap on DataSegmentLength, NOT on the PDU length.
  19. public byte[] ReceiveBuffer = new byte[ReceiveBufferSize]; // immediate receive buffer
  20. public byte[] ConnectionBuffer = new byte[0]; // we append the receive buffer here until we have a complete PDU
  21. }
  22. }