boolean read() throws IOException {
		if(status == Status.CLOSING) {
			return false;
		}
		
		if (socketChannel.isConnected() == false) {
			return false;
		}
		
		if(pingSentTime != 0) {
			if(System.currentTimeMillis() - pingSentTime > PING_WAIT_TIME) {
				socketChannel.close();
				status = Status.CLOSING;
				throw new IOException("Failed to receive pong in time, connection is now invalid.");
			}
		}
		read = socketChannel.read(in);
		
		if(read == 0) {
			return true; // we should never really read 0
		}
		
		if(read == -1) {
			return false; // connection reset by peer
		}
		
		switch(status) {
		case CONNECTING:
			receiveClientHeader();
			break;
		case OPEN:
			readIntoFrame();
			break;
		case RESPONDING:
			break;
		default:
			break;
		
		}
		
		
		return true;

	}