Information
The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.
This topic has not yet been rated - Rate this topic

SendPacketsElement Class

Represents an element in a SendPacketsElement array.

System.Object
  System.Net.Sockets.SendPacketsElement

Namespace:  System.Net.Sockets
Assembly:  System (in System.dll)
public class SendPacketsElement

The SendPacketsElement type exposes the following members.

  NameDescription
Public methodSendPacketsElement(Byte[])Initializes a new instance of the SendPacketsElement class using the specified buffer.
Public methodSendPacketsElement(String)Initializes a new instance of the SendPacketsElement class using the specified file.
Public methodSendPacketsElement(Byte[], Int32, Int32)Initializes a new instance of the SendPacketsElement class using the specified buffer, buffer offset, and count.
Public methodSendPacketsElement(String, Int32, Int32)Initializes a new instance of the SendPacketsElement class using the specified filename path, offset, and count.
Public methodSendPacketsElement(Byte[], Int32, Int32, Boolean)Initializes a new instance of the SendPacketsElement class using the specified buffer, buffer offset, and count with an option to combine this element with the next element in a single send request from the sockets layer to the transport.
Public methodSendPacketsElement(String, Int32, Int32, Boolean)Initializes a new instance of the SendPacketsElement class using the specified filename path, buffer offset, and count with an option to combine this element with the next element in a single send request from the sockets layer to the transport.
Top
  NameDescription
Public propertyBufferGets the buffer to be sent if the SendPacketsElement class was initialized with a buffer parameter.
Public propertyCountGets the count of bytes to be sent.
Public propertyEndOfPacketGets 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.
Public propertyFilePathGets the filename of the file to send if the SendPacketsElement class was initialized with a filepath parameter.
Public propertyOffsetGets 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.
Top
  NameDescription
Public methodEquals(Object)Determines whether the specified Object is equal to the current Object. (Inherited from Object.)
Protected methodFinalizeAllows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection. (Inherited from Object.)
Public methodGetHashCodeServes as a hash function for a particular type. (Inherited from Object.)
Public methodGetTypeGets the Type of the current instance. (Inherited from Object.)
Protected methodMemberwiseCloneCreates a shallow copy of the current Object. (Inherited from Object.)
Public methodToStringReturns a string that represents the current object. (Inherited from Object.)
Top

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.

.NET Framework

Supported in: 4, 3.5 SP1, 3.0 SP1, 2.0 SP1

.NET Framework Client Profile

Supported in: 4, 3.5 SP1

Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

The .NET Framework does not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.

Instances of this class are thread safe.

Did you find this helpful?
(1500 characters remaining)
Thank you for your feedback

Community Additions

Show:
© 2014 Microsoft. All rights reserved.