protected void runLoop() throws Exception {
			log.info("going into selector");
			int numKeys = selector.select();
			log.info("coming out with new keys="+numKeys);
			Set<SelectionKey> keySet = selector.selectedKeys();
			log.info("keySet size="+keySet.size());
			
			Iterator<SelectionKey> iter = keySet.iterator();
			SelectionKey theKey = iter.next();
			log.info("in loop iter.next="+theKey+" isVal="+theKey.isValid()+" acc="+theKey.isAcceptable()+" read="+theKey.isReadable());
			if(theKey.isReadable()) {
				SocketChannel channel = (SocketChannel)theKey.channel();
				log.info("reading bytes");
				int b = 5;
				while(b > 0) {
					b = channel.read(buf);
					if(b < 0) {
						channel.close();
						synchronized(this) {
							socketClosed = true;
							this.notifyAll();
						}
					}
					log.info("bytes read="+b);
				}
			}
			if(iter.hasNext())
				throw new RuntimeException("Fail test, iterator should only have one key");
		}