Code example for ServerSocketChannel

Methods: close

0
	} 
 
	public void stop() { 
		super.stop(); 
		try { 
			ssc.close();
		} catch (IOException e) {
			logger.error("Could not close the ServerSocketChannel properly", e);
		} 
	} 
 
	public void process(PollEvent e) {
		// TODO get rid of PollEvent let mainLoop run forever until a stop event 
		// is received. We can create a new kind of stage that is always runnin 
		mainLoop(); 
	} 
 
	protected void mainLoop() { 
		logger.debug("Enter mainLoop");
		try { 
			int num = selector.select();