Socket getOOBInline Example

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


Socket class getOOBInline example. public boolean getOOBInline() throws SocketException Tests if OOBINLINE is enabled.

Here is the code
/*
 * @ # 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
Tests OOBINLINE is enabled. false
Tests OOBINLINE is enabled. true

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

HOME | COPYRIGHT | CONTACT US