server side: writeInt32( length($message)+4 ); writeString( $message );
client side: $length= readInt32(); readString( $length -4 )
that's just odd, needing to add the number of bytes the length field occupies
This is simpler:
server side: writeInt32( length($message)); writeString( $message );
client side: $length= readInt32(); readString( $length )
Will you plan to correct that in Protocol 3.1?