ByteBuffer out = ByteBuffer.allocate((Constants.HANDSHAKE_SIZE*2)+1);
out.put((byte)0x03);
// TODO: the first four bytes of the handshake reply seem to be the
// server uptime - send something better here...
out.putInt(0x01);
out.fill((byte)0x00,Constants.HANDSHAKE_SIZE-4);
out.put(in);
out.flip();
// Skip first 8 bytes when comparing the handshake, they seem to
// be changed when connecting from a Mac client.
rtmp.setHandshake(out, 9, Constants.HANDSHAKE_SIZE-8);