Socket setOOBInline Example

Socket class setOOBInline example. This example shows you how to use setOOBInline method.


Socket class setOOBInline example. public void setOOBInline(boolean on) throws SocketException Enable/disable OOBINLINE (receipt of TCP urgent data) By default, this option is disabled and TCP urgent data received on a socket is silently discarded.

/*
 * @ # GetOOBInline.java
 * A class repersenting use to getOOBInline method 
 * of NumberFormat class in java.text package
 * version 17 June 2008
 * author Rose India 
 */

import java.net.*;

public class GetOOBInline {

    public static void main(String args[]) throws Exception {

        Socket socket = new Socket();

        //Connects this socket to the server.
        socket.connect(new InetSocketAddress("192.168.10.80"9090));

        System.out.println("Tests OOBINLINE is enabled. " + socket.getOOBInline());
        socket.setOOBInline(true);
        System.out.println("Tests OOBINLINE is enabled. " +socket.getOOBInline());

        //close socket
        socket.close();
    }
}

Output
OOBINLINE is enabled true

Post Comment
Name:
E-mail:
Contact no :
Comments:
  Refresh Image
Verify Image:
 
 
Your Comment's
 
 
 

HOME | COPYRIGHT | CONTACT US