Code example for Selector

Methods: wakeup

0
	 * @throws IOException 
	 *             When socket related I/O errors occur. 
	 */ 
	public void close() throws IOException { 
		if (running) {
			selector.wakeup();
			conn.close();
		} 
	} 
 
	/** 
	 * Sends <var>text</var> to the connected WebSocket server. 
	 *  
	 * @param text 
	 *            The String to send to the WebSocket server. 
	 * @throws IOException 
	 *             When socket related I/O errors occur. 
	 */ 
	public void send(String text) throws IOException {
 
		Log.d("WebSocketClient", "sending text: " + text);