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;
	} 
 
	/** 
	 * Sends <var>text</var> to server 
	 *  
	 * @param text 
	 *            String to send to server 
	 */ 
	public void send(final String text) {
		new Thread(new Runnable() {