Creates a new Message with a random Message ID suitable for sending as a query. @param r A record containing the question
(Record r)
| 78 | * @param r A record containing the question |
| 79 | */ |
| 80 | public static Message |
| 81 | newQuery(Record r) { |
| 82 | Message m = new Message(); |
| 83 | m.header.setOpcode(Opcode.QUERY); |
| 84 | m.header.setFlag(Flags.RD); |
| 85 | m.addRecord(r, Section.QUESTION); |
| 86 | return m; |
| 87 | } |
| 88 | |
| 89 | /** |
| 90 | * Creates a new Message to contain a dynamic update. A random Message ID |