SocketAsyncEventArgs.MemoryBuffer Property

Definition

Gets the region of memory to use as a buffer with an asynchronous socket method.

C#
public Memory<byte> MemoryBuffer { get; }

Property Value

A region of memory that represents the data buffer to use with an asynchronous socket method.

Remarks

This property gets the data buffer currently associated with the SocketAsyncEventArgs instance. To set the buffer, the SetBuffer method must be used.

This property is used with the Socket.AcceptAsync, Socket.ConnectAsync, Socket.ReceiveAsync, Socket.ReceiveFromAsync, Socket.ReceiveMessageFromAsync, Socket.SendAsync, and Socket.SendToAsync methods.

Applies to

Product Versions
.NET Core 2.1, Core 2.2, Core 3.0, Core 3.1, 5, 6, 7, 8, 9, 10
.NET Standard 2.1

See also