public static Message newQuery ( Record r ) { Message m = new Message ( ) ; m . header . setOpcode ( Opcode . QUERY ) ; m . header . setFlag ( Flags . RD ) ; m . addRecord ( r , Section . QUESTION ) ; return m ; }
Creates a new Message with a random Message ID suitable for sending as a query .