public int receive() throws IOException {
  int bytes=channel.read(rxBuffer);
  if (bytes <= 0)   return bytes;
  rxBuffer.flip();
  while (parser.parse(rxBuffer))   ;
  rxBuffer.compact();
  if (rxBuffer.position() == rxBuffer.capacity())   throw new FIXMessageOverflowException("Too long message");
  lastRxMillis=currentTimeMillis;
  return bytes;
}

public int receive ( ) throws IOException { int bytes = channel . read ( rxBuffer ) ; if ( bytes <= 0 ) return bytes ; rxBuffer . flip ( ) ; while ( parser . parse ( rxBuffer ) ) ; rxBuffer . compact ( ) ; if ( rxBuffer . position ( ) == rxBuffer . capacity ( ) ) throw new FIXMessageOverflowException ( "Too long message" ) ; lastRxMillis = currentTimeMillis ; return bytes ; }
receive data from the underlying socket channel . for each message received , invoke the message listener if applicable .
