Windows apps
Collapse the table of content
Expand the table of content
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.

SocketAsyncEventArgs::BufferList Property

 

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

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

public:
property IList<ArraySegment<unsigned char>>^ BufferList {
	IList<ArraySegment<unsigned char>>^ get();
	void set(IList<ArraySegment<unsigned char>>^ value);
}

Property Value

Type: System.Collections.Generic::IList<ArraySegment<Byte>>^

An System.Collections::IList that represents an array of data buffers to use with an asynchronous socket method.

Exception Condition
ArgumentException

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.

Universal Windows Platform
Available since 10
.NET Framework
Available since 2.0
Silverlight
Available since 2.0
Windows Phone Silverlight
Available since 7.1
Return to top
Show:
© 2017 Microsoft