Code example for BlockingQueue

Methods: offer

		// If we didn't get it all sent, add it to the buffer of buffers 
		if (b.remaining() > 0) {
			if (!this.bufferQueue.offer(b)) {
				throw new IOException("Buffers are full, message could not be sent to"
						+ this.socketChannel.socket().getRemoteSocketAddress());
			return false; 
		return true; 
	// actual connection logic 
	private void _connect() throws IOException { 
		// Continuous loop that is only supposed to end when "close" is called.;
		Set<SelectionKey> keys = selector.selectedKeys();