Code example for ServerSocketChannel

Methods: configureBlocking, socket

0
	} 
 
	public void init() throws IOException 
	{ 
		this.socket = ServerSocketChannel.open();
		this.socket.configureBlocking(true);
		this.socket.socket().bind( new InetSocketAddress(
			Integer.getInteger("ftp.port", 21).intValue() ));
	} 
 
	public void run() 
	{ 
		try 
		{ 
			while(true) 
			{ 
				SocketChannel sc = socket.accept();
				new FTPChannel(sc).start();
			} 
		} 
		catch( Exception e )