| Visual Basic (Declaration) | |
|---|---|
<CategoryAttribute("Socket Options")> <DefaultValueAttribute()> <DescriptionAttribute("Gets and Sets the number of milli-seconds that a socket Send() method will block before throwing a SocketException.")> Public Property SendTimeout As Integer | |
| Visual Basic (Usage) | Copy Code |
|---|---|
Dim instance As Tcp Dim value As Integer instance.SendTimeout = value value = instance.SendTimeout | |
| C# | |
|---|---|
[CategoryAttribute("Socket Options")] [DefaultValueAttribute()] [DescriptionAttribute("Gets and Sets the number of milli-seconds that a socket Send() method will block before throwing a SocketException.")] public int SendTimeout {get; set;} | |
| Managed Extensions for C++ | |
|---|---|
[CategoryAttribute("Socket Options")] [DefaultValueAttribute()] [DescriptionAttribute("Gets and Sets the number of milli-seconds that a socket Send() method will block before throwing a SocketException.")] public: __property int get_SendTimeout(); public: __property void set_SendTimeout( int value ); | |
| C++/CLI | |
|---|---|
[CategoryAttribute("Socket Options")] [DefaultValueAttribute()] [DescriptionAttribute("Gets and Sets the number of milli-seconds that a socket Send() method will block before throwing a SocketException.")] public: property int SendTimeout { int get(); void set ( int value); } | |
Property Value
The timeout (in milli-seconds) for completing a blocking Tcp.Send or SegmentedStream.Write. The default is 0, which indicates no timeout.The Tcp component will block (not execute further code on the main thread) until either the data is sent or until the method blocks for the time specified in Tcp.SendTimeout, at which point a SocketException is thrown. The default is 0, which indicates no timeout. Setting this property has no effect on asynchronous methods such as Tcp.BeginSend.
This property is useful for determining network failure while sending data. It is also useful for cases where sending data has to occur quickly or not at all, such as in an ASP script or when connecting and sending data to a series of sockets in a batch process.
Target Platforms: Microsoft .NET Framework 2.0
Copy Code