Online Java Compiler By
JavaTpoint.com
import java.io.IOException; import java.net.*; public class JavaSocketGet00BInlineExample2 { public static void main(String[] args) throws IOException { Socket socket = new Socket(); //closing the socket socket.close(); //enabling the SO_OOBINLINE option boolean on= true; //setOOBInline() method either enables or disables the SO_OOBINLINE option socket.set00BInline(on); //get00BInline() method returns a boolean value true if SO_OOBINLINE option is enabled else it returns false //it will throw an exception, as the socket is already closed. System.out.println("S0_00BINLINE is enabled: "+socket.get00BInline()); } }
Output