संपादित करें

इसके माध्यम से साझा किया गया


SendPacketsElement Class

Definition

Represents an element in a SendPacketsElement array.

public ref class SendPacketsElement
public class SendPacketsElement
type SendPacketsElement = class
Public Class SendPacketsElement
Inheritance
SendPacketsElement

Remarks

The SendPacketsElement class is used to enhance the Socket class for use by server applications that use asynchronous network I/O to achieve the highest performance. The SendPacketsElement class is used with the SocketAsyncEventArgs.SendPacketsElements property to get or set a data buffer or file to be sent using the Socket.SendPacketsAsync method.

Constructors

SendPacketsElement(Byte[], Int32, Int32, Boolean)

Initializes a new instance of the SendPacketsElement class using the specified range of the buffer with an option to combine this element with the next element in a single send request from the sockets layer to the transport.

SendPacketsElement(Byte[], Int32, Int32)

Initializes a new instance of the SendPacketsElement class using the specified range of the buffer.

SendPacketsElement(Byte[])

Initializes a new instance of the SendPacketsElement class using the specified buffer.

SendPacketsElement(FileStream, Int64, Int32, Boolean)

Initializes a new instance of the SendPacketsElement class using the specified range of a FileStream object with an option to combine this element with the next element in a single send request from the sockets layer to the transport.

SendPacketsElement(FileStream, Int64, Int32)

Initializes a new instance of the SendPacketsElement class using the specified range of a FileStream object.

SendPacketsElement(FileStream)

Initializes a new instance of the SendPacketsElement class using the specified FileStream object.

SendPacketsElement(ReadOnlyMemory<Byte>, Boolean)

Initializes a new instance of the SendPacketsElement class using the specified buffer with an option to combine this element with the next element in a single send request from the sockets layer to the transport.

SendPacketsElement(ReadOnlyMemory<Byte>)

Initializes a new instance of the SendPacketsElement class using the specified buffer.

SendPacketsElement(String, Int32, Int32, Boolean)

Initializes a new instance of the SendPacketsElement class using the specified range of the file with an option to combine this element with the next element in a single send request from the sockets layer to the transport.

SendPacketsElement(String, Int32, Int32)

Initializes a new instance of the SendPacketsElement class using the specified range of the file.

SendPacketsElement(String, Int64, Int32, Boolean)

Initializes a new instance of the SendPacketsElement class using the specified range of the file with an option to combine this element with the next element in a single send request from the sockets layer to the transport.

SendPacketsElement(String, Int64, Int32)

Initializes a new instance of the SendPacketsElement class using the specified range of the file.

SendPacketsElement(String)

Initializes a new instance of the SendPacketsElement class using the specified file.

Properties

Buffer

Gets the buffer to be sent if the SendPacketsElement object was initialized with a buffer parameter.

Count

Gets the count of bytes to be sent.

EndOfPacket

Gets a Boolean value that indicates if this element should not be combined with the next element in a single send request from the sockets layer to the transport.

FilePath

Gets the filename of the file to send if the SendPacketsElement object was initialized with a filepath parameter.

FileStream

Gets the object representation of the file to send if the SendPacketsElement object was initialized with a FileStream parameter.

MemoryBuffer

Gets the buffer to be sent if the SendPacketsElement object was initialized with a buffer parameter.

Offset

Gets the offset, in bytes, from the beginning of the data buffer or file to the location in the buffer or file to start sending the data.

OffsetLong

Gets the offset, in bytes, from the beginning of the data buffer or file to the location in the buffer or file to start sending the data.

Methods

Equals(Object)

Determines whether the specified object is equal to the current object.

(Inherited from Object)
GetHashCode()

Serves as the default hash function.

(Inherited from Object)
GetType()

Gets the Type of the current instance.

(Inherited from Object)
MemberwiseClone()

Creates a shallow copy of the current Object.

(Inherited from Object)
ToString()

Returns a string that represents the current object.

(Inherited from Object)

Applies to

Thread Safety

Instances of this class are thread safe.

See also