code: public synchronized boolean receive(Tree message) {
  
  		// Update timestamp
  		if (timeoutMillis > 0) {
  			timeoutAt = System.currentTimeMillis() + timeoutMillis;
  		}
  
  		// Check sequence number
  		long seq = message.get("seq", -1);
  		if (seq > -1) {
  			if (seq - 1 == prevSeq) {
  				prevSeq = seq;
  			} else {
  
  				// Process later
  				pool.put(seq, message);
  				return false;
  			}
  		} else {
  			prevSeq = -1;
  		}
  
  		// Process current message
  		boolean close = processMessage(message);
  
  		// Process pooled messages
  		long nextSeq = prevSeq;
  		while (true) {
  			Tree nextMessage = pool.remove(++nextSeq);
  			if (nextMessage == null) {
  				break;
  			}
  			prevSeq = nextSeq;
  			if (processMessage(nextMessage)) {
  				close = true;
  			}
  		}
  
  		// True = remove stream from registry
  		return close;
  	}
docs: --- RECEIVE PACKET ---