SocketAsyncEventArgs.BytesTransferred Property

 

Gets the number of bytes transferred in the socket operation.

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

public int BytesTransferred { get; }

Property Value

Type: System.Int32

An Int32 that contains the number of bytes transferred in the socket operation.

This property provides the number of bytes transferred in an asynchronous socket operation that can receive or send data. If zero is returned from a read operation, the remote end has closed the connection.

This property is set by all asynchronous socket operations except the Socket.DisconnectAsync method.

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: