6 internal string m_FilePath;
8 internal byte[] m_Buffer;
10 internal int m_Offset;
14 internal UnsafeNclNativeMethods.OSSOCK.TransmitPacketsElementFlags m_Flags;
34 public bool EndOfPacket => (m_Flags & UnsafeNclNativeMethods.OSSOCK.TransmitPacketsElementFlags.EndOfPacket) != UnsafeNclNativeMethods.OSSOCK.TransmitPacketsElementFlags.None;
44 : this(filepath, 0, 0, endOfPacket: false)
55 : this(filepath, offset, count, endOfPacket: false)
80 Initialize(filepath,
null, offset, count, UnsafeNclNativeMethods.OSSOCK.TransmitPacketsElementFlags.File, endOfPacket);
87 : this(buffer, 0, (buffer != null) ? buffer.Length : 0, endOfPacket: false)
98 : this(buffer, offset, count, endOfPacket: false)
115 if (offset < 0 || offset > buffer.Length)
119 if (count < 0 || count > buffer.Length - offset)
123 Initialize(
null, buffer, offset, count, UnsafeNclNativeMethods.OSSOCK.TransmitPacketsElementFlags.Memory, endOfPacket);
126 private void Initialize(
string filePath,
byte[] buffer,
int offset,
int count, UnsafeNclNativeMethods.OSSOCK.TransmitPacketsElementFlags flags,
bool endOfPacket)
128 m_FilePath = filePath;
135 m_Flags |= UnsafeNclNativeMethods.OSSOCK.TransmitPacketsElementFlags.EndOfPacket;
The exception that is thrown when a null reference (Nothing in Visual Basic) is passed to a method th...
Represents an element in a T:System.Net.Sockets.SendPacketsElement array.
string FilePath
Gets the filename of the file to send if the T:System.Net.Sockets.SendPacketsElement class was initia...
SendPacketsElement(byte[] buffer, int offset, int count, bool endOfPacket)
Initializes a new instance of the T:System.Net.Sockets.SendPacketsElement class using the specified b...
The exception that is thrown when the value of an argument is outside the allowable range of values a...
SendPacketsElement(byte[] buffer, int offset, int count)
Initializes a new instance of the T:System.Net.Sockets.SendPacketsElement class using the specified b...
SendPacketsElement(string filepath, int offset, int count)
Initializes a new instance of the T:System.Net.Sockets.SendPacketsElement class using the specified f...
int Count
Gets the count of bytes to be sent.
SendPacketsElement(string filepath, int offset, int count, bool endOfPacket)
Initializes a new instance of the T:System.Net.Sockets.SendPacketsElement class using the specified f...
bool EndOfPacket
Gets a Boolean value that indicates if this element should not be combined with the next element in a...
SendPacketsElement(string filepath)
Initializes a new instance of the T:System.Net.Sockets.SendPacketsElement class using the specified f...
int Offset
Gets the offset, in bytes, from the beginning of the data buffer or file to the location in the buffe...
Manipulates arrays of primitive types.