Java Socket setOOBInline() method

The setOOBInline() method of Java Socket class enables or disables the SO_OOBInline. By default, the SO_OOBInline option is disabled.

Syntax

Parameter

The 'on' represents whether the SO_OOBInline option should enabled or not.

Return

NA

Throws

SocketException - if there is an error in the underlying protocol, such as a TCP error.

Example 1

Test it Now

Output:

SO_OOBINLINE is enabled: true

Example 2

Test it Now

Output:

SO_OOBInline is not enabled




Latest Courses