System.Net.Sockets.TcpClient.SendTimeout Property

Gets or sets the amount of time a System.Net.Sockets.TcpClient will wait for a send operation to complete successfully.

Syntax

public int SendTimeout { get; set; }

Value

Documentation for this section has not yet been entered.

Remarks

The TcpClient.SendTimeout property determines the amount of time that the Socket.Send(Byte[], int, SocketFlags) method will block until it is able to return successfully. This time is measured in milliseconds.

After you call the NetworkStream.Write(Byte[], int, int) method, the underlying System.Net.Sockets.Socket returns the number of bytes actually sent to the host. The TcpClient.SendTimeout property determines the amount of time a System.Net.Sockets.TcpClient will wait before receiving the number of bytes returned. If the time-out expires before the Socket.Send(Byte[], int, SocketFlags) method successfully completes, System.Net.Sockets.TcpClient will throw a System.Net.Sockets.SocketException. There is no time-out by default.

Requirements

Namespace: System.Net.Sockets
Assembly: System (in System.dll)
Assembly Versions: 1.0.5000.0, 2.0.0.0, 4.0.0.0