Online Java Compiler By
JavaTpoint.com
import java.io.IOException; import java.net.*; public class JavaSocketSetOOBInlineExample2 { public static void main(String[] args) throws IOException { Socket socket = new Socket(); boolean on=false; //setOOBInline() enables or disables the SO_OOBInline option socket.setOOBInline(on); //getOOBInline() returns a boolean indicating whether SO_OOBInline option is enabled or not //by default it returns false if(socket.getOOBInline()){ System.out.println("SO_OOBInline is enabled..."); } else{ System.out.println("SO_OOBInline is not enabled"); } } }
Output