See Also

Tcp Class  | Tcp Members

Requirements

Platforms: Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family

Language

Visual Basic

C#

C++

C++/CLI

Show All

See Also Languages PowerTCP SSL Sockets for .NET

ReceiveTimeout Property

Dart.PowerTCP.SslSockets Namespace > Tcp Class : ReceiveTimeout Property

Gets and sets the number of milliseconds that a Receive method will block before throwing a SocketException.

[Visual Basic]
<DescriptionAttribute("Gets and Sets the number of milli-seconds that a socket Receive() method will block before throwing a SocketException.")> <CategoryAttribute("Socket Options")> <DefaultValueAttribute()> Public Property ReceiveTimeout As Integer
[C#]
[DescriptionAttribute("Gets and Sets the number of milli-seconds that a socket Receive() method will block before throwing a SocketException.")] [CategoryAttribute("Socket Options")] [DefaultValueAttribute()] public int ReceiveTimeout {get; set;}
[C++]
[DescriptionAttribute("Gets and Sets the number of milli-seconds that a socket Receive() method will block before throwing a SocketException.")] [CategoryAttribute("Socket Options")] [DefaultValueAttribute()] public: __property int get_ReceiveTimeout(); public: __property void set_ReceiveTimeout(    int value );
[C++/CLI]
[DescriptionAttribute("Gets and Sets the number of milli-seconds that a socket Receive() method will block before throwing a SocketException.")] [CategoryAttribute("Socket Options")] [DefaultValueAttribute()] public: property int ReceiveTimeout {    int get();    void set (int value); }

Return Type

The timeout (in milliseconds) for completing a blocking Tcp.Receive or Tcp.Stream.Read.

Remarks

The Tcp component will block (not execute further code on the main thread) until either the data requested is received or until the method blocks for the time specified in Tcp.ReceiveTimeout, at which point a SocketException is thrown. The default is 0, which indicates no timeout. When using BeginReceive, the EndReceive event will fire with a SocketException, if the ReceiveTimeout period expires.

This property is useful for determining network failure while receiving data. It is also useful for cases where the response from the server has to occur quickly or not at all, such as in an ASP script or when connecting and receiving data from a series of sockets in a batch process.

If building a server application, this value determines how long a child connection can be idle before disconnecting them.

Note: If the ReceiveTimeout period expires, the resulting SocketException will NOT cause the connection to sever. This is different behavior that earlier versions of the Tcp object.

Requirements

Platforms: Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family

See Also

Tcp Class  | Tcp Members


Send comments on this topic.

Documentation version 1.1.2.0.

© 2008 Dart Communications.  All rights reserved.