Examples of DNSIncoming


Examples of javax.jmdns.impl.DNSIncoming

        // for (int i = 0; i < data.length; i++)
        // {
        // assertEquals("the encoded message is not what is expected at index " + i, expected[i], data[i]);
        // }
        DatagramPacket packet = new DatagramPacket(data, 0, data.length);
        DNSIncoming in = new DNSIncoming(packet);
        assertTrue("Wrong packet type.", in.isResponse());
        assertEquals("Wrong number of questions.", 1, in.getNumberOfQuestions());
        assertEquals("Wrong number of answers.", 1, in.getNumberOfAnswers());
        assertEquals("Wrong number of authorities.", 1, in.getNumberOfAuthorities());
        for (DNSQuestion question : in.getQuestions()) {
            assertEquals("Wrong question name.", serviceName, question.getName());
        }
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.