Socket sendUrgentData Example

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


Socket class sendUrgentData example. public void sendUrgentData(int data) throws IOException Send one byte of urgent data on the socket. The byte to be sent is the lowest eight bits of the data parameter. The urgent byte is sent after any preceding writes to the socket OutputStream and before any future writes to the OutputStream.

Here is the code
/*
 * @ # IsOutputShutdown.java
 * A class repersenting use to IsOutputShutdown method 
 * of NumberFormat class in java.net package
 * version 17 June 2008
 * author Rose India 
 */

import java.net.*;

public class SendUrgentData {

    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.211"8080));

        System.out.println("send Urgent Data ... ");
        socket.sendUrgentData(12);
        socket.close();
    }
}

Output
send Urgent Data ...

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

HOME | COPYRIGHT | CONTACT US