当前位置: 首页>>代码示例>>Java>>正文


Java DNSConstants.FLAGS_AA属性代码示例

本文整理汇总了Java中javax.jmdns.impl.constants.DNSConstants.FLAGS_AA属性的典型用法代码示例。如果您正苦于以下问题:Java DNSConstants.FLAGS_AA属性的具体用法?Java DNSConstants.FLAGS_AA怎么用?Java DNSConstants.FLAGS_AA使用的例子?那么恭喜您, 这里精选的属性代码示例或许可以为您提供帮助。您也可以进一步了解该属性所在javax.jmdns.impl.constants.DNSConstants的用法示例。


在下文中一共展示了DNSConstants.FLAGS_AA属性的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: addAnswer

/**
 * Add an answer to a question. Deal with the case when the outgoing packet overflows
 *
 * @param in
 * @param addr
 * @param port
 * @param out
 * @param rec
 * @return outgoing answer
 * @exception IOException
 */
public DNSOutgoing addAnswer(DNSIncoming in, InetAddress addr, int port, DNSOutgoing out, DNSRecord rec) throws IOException {
    DNSOutgoing newOut = out;
    if (newOut == null) {
        newOut = new DNSOutgoing(DNSConstants.FLAGS_QR_RESPONSE | DNSConstants.FLAGS_AA, false, in.getSenderUDPPayload());
    }
    try {
        newOut.addAnswer(in, rec);
    } catch (final IOException e) {
        newOut.setFlags(newOut.getFlags() | DNSConstants.FLAGS_TC);
        newOut.setId(in.getId());
        send(newOut);

        newOut = new DNSOutgoing(DNSConstants.FLAGS_QR_RESPONSE | DNSConstants.FLAGS_AA, false, in.getSenderUDPPayload());
        newOut.addAnswer(in, rec);
    }
    return newOut;
}
 
开发者ID:iilxy,项目名称:AndroidmDNS,代码行数:28,代码来源:JmDNSImpl.java

示例2: addAnswer

/**
 * Add an answer to a question. Deal with the case when the outgoing packet overflows
 *
 * @param in
 * @param addr
 * @param port
 * @param out
 * @param rec
 * @return outgoing answer
 * @throws java.io.IOException
 */
public DNSOutgoing addAnswer(DNSIncoming in, InetAddress addr, int port, DNSOutgoing out, DNSRecord rec) throws IOException
{
    DNSOutgoing newOut = out;
    if (newOut == null)
    {
        newOut = new DNSOutgoing(DNSConstants.FLAGS_QR_RESPONSE | DNSConstants.FLAGS_AA, false, in.getSenderUDPPayload());
    }
    try
    {
        newOut.addAnswer(in, rec);
    }
    catch (final IOException e)
    {
        newOut.setFlags(newOut.getFlags() | DNSConstants.FLAGS_TC);
        newOut.setId(in.getId());
        send(newOut);

        newOut = new DNSOutgoing(DNSConstants.FLAGS_QR_RESPONSE | DNSConstants.FLAGS_AA, false, in.getSenderUDPPayload());
        newOut.addAnswer(in, rec);
    }
    return newOut;
}
 
开发者ID:blackshadowwalker,项目名称:log4j-collector,代码行数:33,代码来源:JmDNSImpl.java

示例3: createOugoing

@Override
protected DNSOutgoing createOugoing() {
    return new DNSOutgoing(DNSConstants.FLAGS_QR_RESPONSE | DNSConstants.FLAGS_AA);
}
 
开发者ID:iilxy,项目名称:AndroidmDNS,代码行数:4,代码来源:Announcer.java

示例4: createOugoing

@Override
protected DNSOutgoing createOugoing()
{
    return new DNSOutgoing(DNSConstants.FLAGS_QR_RESPONSE | DNSConstants.FLAGS_AA);
}
 
开发者ID:blackshadowwalker,项目名称:log4j-collector,代码行数:5,代码来源:Announcer.java

示例5: isAuthoritativeAnswer

/**
 * Check if the message is an authoritative answer.
 *
 * @return true if the message is an authoritative answer
 */
public boolean isAuthoritativeAnswer() {
    return (_flags & DNSConstants.FLAGS_AA) != 0;
}
 
开发者ID:iilxy,项目名称:AndroidmDNS,代码行数:8,代码来源:DNSMessage.java


注:本文中的javax.jmdns.impl.constants.DNSConstants.FLAGS_AA属性示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。