BufferList Property

SocketAsyncEventArgs.BufferList Property

[ This article is for Windows Phone 8 developers. If you’re developing for Windows 10, see the latest documentation. ]

Gets or sets an array of data buffers to use with an asynchronous socket method.

Namespace:  System.Net.Sockets
Assembly:  System.Net (in System.Net.dll)

public IList<ArraySegment<byte>> BufferList { get; set; }

Property Value

Type: System.Collections.Generic.IList<ArraySegment<Byte>>
An array of data buffers to use with an asynchronous socket method.

ExceptionCondition
ArgumentException

There are ambiguous buffers specified on a set operation. This exception occurs if a value other than null is passed and the Buffer property is also not null.

This property is an System.Collections.IList that represents an array of data buffers to use with an asynchronous socket method. 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 are supported only by the Socket.ReceiveAsync and Socket.SendAsync methods.

This property is used with the Socket.ReceiveAsync and Socket.SendAsync methods. The Buffer property is ignored by these operations when the BufferList property has been set to a non-null value. If both the Buffer and BufferList properties are set, an exception is thrown.

Windows Phone OS

Supported in: 8.1, 8.0, 7.1

Windows Phone

Show:
© 2017 Microsoft