ServerSocket GetChannel() Example

Returns the unique ServerSocketChannel object associated with this socket, if any.


ServerSocketclass GetChannel() method example. This example shows you how to use GetChannel() method.This method Returns the unique ServerSocketChannel object associated with this socket, if any.

Here is the code:-

/**
 * @Program that Returns the unique ServerSocketChannel object associated with 
 * this socket, if any
 * GetChannel.java 
 * Author:-RoseIndia Team
 * Date:-21-jun-2008
 */
import java.net.*;

public class GetChannel {

    public static void main(String[] argsthrows Exception {
        ServerSocket ss = new ServerSocket(8080);
        //Returns the unique ServerSocketChannel object associated with this socket
        System.out.println(ss.getChannel());

    }
}

Output of the program:-
 null

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

HOME | COPYRIGHT | CONTACT US