magicBuf = ByteBufferAllocator.allocate( 4, false );
semiBlockingRead( channel, magicBuf, timeout );
// at least the handshake must be read in one operation
// if not prevent us from dealing with bad networks or crappy clients
if ( magicBuf.hasRemaining() ) return null;
magicBuf.flip();
// copy the read four byte into a buffer - we will need them again maybe
preReadData = new byte[4];
magicBuf.get( preReadData );
magicBuf.rewind();
// read the first four bytes as int