SocketAsyncEventArgs.BufferList Propriedade
Definição
Obtém ou define uma matriz de buffers de dados a ser usada com um método de soquete assíncrono.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))
Valor da propriedade
Um IList que representa uma matriz de buffers de dados a serem usados com um método de soquete assíncrono.An IList that represents an array of data buffers to use with an asynchronous socket method.
Exceções
Há buffers ambíguos especificados em uma operação de conjuntos.There are ambiguous buffers specified on a set operation. Essa exceção ocorre se a propriedade Buffer foi definida para um valor não nulo e foi feita uma tentativa de definir a propriedade BufferList como um valor não nulo.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.
Comentários
Essa propriedade é usada com os Socket.ReceiveAsync Socket.SendAsync métodos e.This property is used with the Socket.ReceiveAsync and Socket.SendAsync methods.
Essa propriedade é usada para fornecer vários buffers de dados a serem enviados ou para fornecer vários buffers nos quais armazenar dados recebidos para uma operação de soquete assíncrona que pode enviar ou receber dados.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. Há suporte para vários buffers usando a BufferList propriedade dos Socket.ReceiveAsync Socket.SendAsync métodos e.Multiple buffers using the BufferList property are supported by the Socket.ReceiveAsync and Socket.SendAsync methods.
Se a BufferList propriedade for definida como um valor não nulo, a Buffer Propriedade deverá ser nula e será ignorada pelos Socket.ReceiveAsync métodos e Socket.SendAsync .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.
Se o Buffer tiver sido definido como um valor não nulo e for feita uma tentativa de definir a BufferList propriedade como um valor não nulo, uma exceção será lançada.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.
Se a BufferList propriedade for definida como um valor não nulo, os Socket.ConnectAsync métodos e Socket.AcceptAsync gerarão um ArgumentException .If the BufferList property is set to a non-null value, the Socket.ConnectAsync and Socket.AcceptAsync methods will throw an ArgumentException.
O BufferList parâmetro é ignorado pelos Socket.DisconnectAsync métodos e Socket.SendPacketsAsync .The BufferList parameter is ignored by the Socket.DisconnectAsync and Socket.SendPacketsAsync methods.