Code example for Selector

Methods: wakeup

0
			this.socketChannel.close();
		} catch (IOException e) {
			this.onError(e);
		} 
		this.running = false;
		selector.wakeup();
 
		// fire onClose method 
		this.onClose();
 
		this.readyState = WebSocket.WEBSOCKET_STATE_CLOSED;
	} 
 
	 
	 
	// a message is sent to server!  
	public void send(final String text) {
		// new thread 
		new Thread(new Runnable() {
			@Override 
			public void run() {