共用方式為


SocketAsyncEventArgs.BufferList Property

Microsoft Silverlight will reach end of support after October 2021. Learn more.

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)

Syntax

'Declaration
Public Property BufferList As IList(Of ArraySegment(Of Byte))
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.

Exceptions

Exception Condition
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.

Remarks

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.

Version Information

Silverlight

Supported in: 5, 4, 3

Silverlight for Windows Phone

Supported in: Windows Phone OS 7.1

Platforms

For a list of the operating systems and browsers that are supported by Silverlight, see Supported Operating Systems and Browsers.