SocketAsyncEventArgs.BufferList Property
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Gets or sets an array of data buffers to use with an asynchronous socket method.
public:
property System::Collections::Generic::IList<ArraySegment<System::Byte>> ^ BufferList { System::Collections::Generic::IList<ArraySegment<System::Byte>> ^ get(); void set(System::Collections::Generic::IList<ArraySegment<System::Byte>> ^ value); };
public System.Collections.Generic.IList<ArraySegment<byte>> BufferList { get; set; }
public System.Collections.Generic.IList<ArraySegment<byte>>? BufferList { get; set; }
member this.BufferList : System.Collections.Generic.IList<ArraySegment<byte>> with get, set
Public Property BufferList As IList(Of ArraySegment(Of Byte))
An IList that represents an array of data buffers to use with an asynchronous socket method.
There are ambiguous buffers specified on a set operation. This exception occurs if the Buffer property has been set to a non-null value and an attempt was made to set the BufferList property to a non-null value.
This property is used with the Socket.ReceiveAsync and Socket.SendAsync methods.
This property is used to provide multiple buffers of data to be sent or to provide multiple buffers in which to store received data for an asynchronous socket operation that can send or receive data. Multiple buffers using the BufferList property are supported by the Socket.ReceiveAsync and Socket.SendAsync methods.
If the BufferList property is set to a non-null value, the Buffer property must be null and is ignored by the Socket.ReceiveAsync and Socket.SendAsync methods.
If the Buffer was set to a non-null value and an attempt is made to set the BufferList property to a non-null value, an exception is thrown.
If the BufferList property is set to a non-null value, the Socket.ConnectAsync and Socket.AcceptAsync methods will throw an ArgumentException.
The BufferList parameter is ignored by the Socket.DisconnectAsync and Socket.SendPacketsAsync methods.
Product | Versions |
---|---|
.NET | Core 1.0, Core 1.1, Core 2.0, Core 2.1, Core 2.2, Core 3.0, Core 3.1, 5, 6, 7, 8, 9, 10 |
.NET Framework | 2.0, 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1 |
.NET Standard | 1.3, 1.4, 1.6, 2.0, 2.1 |
UWP | 10.0 |
.NET feedback
.NET is an open source project. Select a link to provide feedback: