Early Preview
This is currently very much a preview. Please feel free to try things out,
but don't be upset if anything is not yet working. Feedback is welcome over on our
GitHub Dicussions page.
class System.​Net.​Sockets.​SocketAsyncEventArgs
Assembly: System.Net.Sockets
Inheritance: object → EventArgs → SocketAsyncEventArgs
Implemented Interfaces
Represents an asynchronous socket operation.
Properties
public
Socket
AcceptSocket
Gets or sets the socket to use or the socket created for accepting a connection with an asynchronous socket method.
public
byte[]
Buffer
Gets the data buffer to use with an asynchronous socket method.
public
Collections.​Generic.​IList<​ArraySegment<​byte>>
BufferList
Gets or sets an array of data buffers to use with an asynchronous socket method.
public
int
BytesTransferred
Gets the number of bytes transferred in the socket operation.
public
Exception
ConnectByNameError
Gets the exception in the case of a connection failure when a <see cref="T:System.Net.DnsEndPoint" /> was used.
public
Socket
ConnectSocket
The created and connected <see cref="T:System.Net.Sockets.Socket" /> object after successful completion of the <see cref="Overload:System.Net.Sockets.Socket.ConnectAsync" /> method.
public
int
Count
Gets the maximum amount of data, in bytes, to send or receive in an asynchronous operation.
public
bool
DisconnectReuseSocket
Gets or sets a value that specifies if socket can be reused after a disconnect operation.
public
SocketAsyncOperation
LastOperation
Gets the type of socket operation most recently performed with this context object.
public
Memory<​byte>
MemoryBuffer
Gets the region of memory to use as a buffer with an asynchronous socket method.
public
int
Offset
Gets the offset, in bytes, into the data buffer referenced by the <see cref="P:System.Net.Sockets.SocketAsyncEventArgs.Buffer" /> property.
public
IPPacketInformation
ReceiveMessageFromPacketInfo
Gets the IP address and interface of a received packet.
public
EndPoint
RemoteEndPoint
Gets or sets the remote IP endpoint for an asynchronous operation.
public
SendPacketsElement[]
SendPacketsElements
Gets or sets an array of buffers to be sent for an asynchronous operation used by the <see cref="M:System.Net.Sockets.Socket.SendPacketsAsync(System.Net.Sockets.SocketAsyncEventArgs)" /> method.
public
TransmitFileOptions
SendPacketsFlags
Gets or sets a bitwise combination of <see cref="T:System.Net.Sockets.TransmitFileOptions" /> values for an asynchronous operation used by the <see cref="M:System.Net.Sockets.Socket.SendPacketsAsync(System.Net.Sockets.SocketAsyncEventArgs)" /> method.
public
int
SendPacketsSendSize
Gets or sets the size, in bytes, of the data block used in the send operation.
public
SocketError
SocketError
Gets or sets the result of the asynchronous socket operation.
public
SocketFlags
SocketFlags
Gets the results of an asynchronous socket operation or sets the behavior of an asynchronous operation.
public
object
UserToken
Gets or sets a user or application object associated with this asynchronous socket operation.
Methods
public
void
Dispose​()
Releases the unmanaged resources used by the <see cref="T:System.Net.Sockets.SocketAsyncEventArgs" /> instance and optionally disposes of the managed resources.
protected
void
Finalize​()
Frees resources used by the <see cref="T:System.Net.Sockets.SocketAsyncEventArgs" /> class.
protected
void
OnCompleted​(SocketAsyncEventArgs e)
Represents a method that is called when an asynchronous operation completes.
e
The event that is signaled.
public
void
SetBuffer​(byte[] buffer,
int offset,
int count)
Sets the data buffer to use with an asynchronous socket method.
buffer
The data buffer to use with an asynchronous socket method.
offset
The offset, in bytes, in the data buffer where the operation starts.
count
The maximum amount of data, in bytes, to send or receive in the buffer.
public
void
SetBuffer​(int offset,
int count)
Sets the data buffer to use with an asynchronous socket method.
offset
The offset, in bytes, in the data buffer where the operation starts.
count
The maximum amount of data, in bytes, to send or receive in the buffer.
public
void
SetBuffer​(Memory<​byte> buffer)
Sets the region of memory to use as a buffer with an asynchronous socket method.
buffer
The region of memory to use as a buffer with an asynchronous socket method.
public
bool
Equals​(object obj)
Inherited from object
public
int
GetHashCode​()
Inherited from object
protected
object
MemberwiseClone​()
Inherited from object
public
string
ToString​()
Inherited from object