| Visual Basic (Declaration) | |
|---|---|
<DescriptionAttribute("Gets and Sets the number of milli-seconds that a socket Connect() method will block before throwing a SocketException.")> <DefaultValueAttribute()> <CategoryAttribute("Socket Options")> Public Property ConnectTimeout As Integer | |
| Visual Basic (Usage) | Copy Code |
|---|---|
Dim instance As Tcp Dim value As Integer instance.ConnectTimeout = value value = instance.ConnectTimeout | |
| C# | |
|---|---|
[DescriptionAttribute("Gets and Sets the number of milli-seconds that a socket Connect() method will block before throwing a SocketException.")] [DefaultValueAttribute()] [CategoryAttribute("Socket Options")] public int ConnectTimeout {get; set;} | |
| Managed Extensions for C++ | |
|---|---|
[DescriptionAttribute("Gets and Sets the number of milli-seconds that a socket Connect() method will block before throwing a SocketException.")] [DefaultValueAttribute()] [CategoryAttribute("Socket Options")] public: __property int get_ConnectTimeout(); public: __property void set_ConnectTimeout( int value ); | |
| C++/CLI | |
|---|---|
[DescriptionAttribute("Gets and Sets the number of milli-seconds that a socket Connect() method will block before throwing a SocketException.")] [DefaultValueAttribute()] [CategoryAttribute("Socket Options")] public: property int ConnectTimeout { int get(); void set ( int value); } | |
Property Value
The number of milliseconds to wait for response from the server when connecting. The default value is 0.The Object.Connect method will block for the amount of time specified by Object.ConnectTimeout. If no response is received from the server in this amount of time, a System.Net.SocketException will be thrown. The default value is 0, indicating no timeout is used.
NOTE. There is no pragmatic control over which the system will wait for a response. The generally accepted maximum wait time for Windows platforms appears to be 25 seconds. If you set this property for a value less than 25 seconds, PowerTCP will throw a SocketException. If you set it for a value greater than 25 seconds, the system may throw an exception before your specified timeout is reached.
Target Platforms: Microsoft .NET Framework 2.0
Copy Code