Socket.SetSoLinger(Boolean, Int32) Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Enable/disable SocketOptions#SO_LINGER SO_LINGER
with the
specified linger time in seconds.
[Android.Runtime.Register("setSoLinger", "(ZI)V", "GetSetSoLinger_ZIHandler")]
public virtual void SetSoLinger (bool on, int linger);
[<Android.Runtime.Register("setSoLinger", "(ZI)V", "GetSetSoLinger_ZIHandler")>]
abstract member SetSoLinger : bool * int -> unit
override this.SetSoLinger : bool * int -> unit
Parameters
- on
- Boolean
whether or not to linger on.
- linger
- Int32
how long to linger for, if on is true.
- Attributes
Exceptions
Remarks
Enable/disable SocketOptions#SO_LINGER SO_LINGER
with the specified linger time in seconds. The maximum timeout value is platform specific.
The setting only affects socket close.
Added in 1.1.
Java documentation for java.net.Socket.setSoLinger(boolean, int)
.
Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.