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[] args) throws Exception {
ServerSocket ss = new ServerSocket(8080);
//Returns the unique ServerSocketChannel object associated with this socket
System.out.println(ss.getChannel());
}
} |
|