Java 类cpw.mods.fml.common.network.internal.FMLMessage.CompleteHandshake 实例源码

项目:TRHS_Club_Mod_2016    文件:FMLNetworkHandler.java   
public static List<FMLProxyPacket> forwardHandshake(CompleteHandshake push, NetworkDispatcher target, Side side)
{
    channelPair.get(side).attr(NetworkDispatcher.FML_DISPATCHER).set(target);
    channelPair.get(side).writeOutbound(push);

    ArrayList<FMLProxyPacket> list = new ArrayList<FMLProxyPacket>();
    for (Object o: channelPair.get(side).outboundMessages())
    {
        list.add((FMLProxyPacket)o);
    }
    channelPair.get(side).outboundMessages().clear();
    return list;
}
项目:CauldronGit    文件:FMLNetworkHandler.java   
public static List<FMLProxyPacket> forwardHandshake(CompleteHandshake push, NetworkDispatcher target, Side side)
{
    channelPair.get(side).attr(NetworkDispatcher.FML_DISPATCHER).set(target);
    channelPair.get(side).writeOutbound(push);

    ArrayList<FMLProxyPacket> list = new ArrayList<FMLProxyPacket>();
    for (Object o: channelPair.get(side).outboundMessages())
    {
        list.add((FMLProxyPacket)o);
    }
    channelPair.get(side).outboundMessages().clear();
    return list;
}
项目:Cauldron    文件:FMLNetworkHandler.java   
public static List<FMLProxyPacket> forwardHandshake(CompleteHandshake push, NetworkDispatcher target, Side side)
{
    channelPair.get(side).attr(NetworkDispatcher.FML_DISPATCHER).set(target);
    channelPair.get(side).writeOutbound(push);

    ArrayList<FMLProxyPacket> list = new ArrayList<FMLProxyPacket>();
    for (Object o: channelPair.get(side).outboundMessages())
    {
        list.add((FMLProxyPacket)o);
    }
    channelPair.get(side).outboundMessages().clear();
    return list;
}
项目:Cauldron    文件:HandshakeCompletionHandler.java   
@Override
protected void channelRead0(ChannelHandlerContext ctx, CompleteHandshake msg) throws Exception
{
    // Cauldron start - attempt to fix race condition with attr being null
    Object attr = ctx.channel().attr(NetworkDispatcher.FML_DISPATCHER);
    if (attr != null)
    {
    NetworkDispatcher dispatcher = ctx.channel().attr(NetworkDispatcher.FML_DISPATCHER).getAndRemove();
    dispatcher.completeHandshake(msg.target);
}
    // Cauldron end
}
项目:Cauldron    文件:FMLNetworkHandler.java   
public static List<FMLProxyPacket> forwardHandshake(CompleteHandshake push, NetworkDispatcher target, Side side)
{
    channelPair.get(side).attr(NetworkDispatcher.FML_DISPATCHER).set(target);
    channelPair.get(side).writeOutbound(push);

    ArrayList<FMLProxyPacket> list = new ArrayList<FMLProxyPacket>();
    for (Object o: channelPair.get(side).outboundMessages())
    {
        list.add((FMLProxyPacket)o);
    }
    channelPair.get(side).outboundMessages().clear();
    return list;
}
项目:Cauldron    文件:FMLNetworkHandler.java   
public static List<FMLProxyPacket> forwardHandshake(CompleteHandshake push, NetworkDispatcher target, Side side)
{
    channelPair.get(side).attr(NetworkDispatcher.FML_DISPATCHER).set(target);
    channelPair.get(side).writeOutbound(push);

    ArrayList<FMLProxyPacket> list = new ArrayList<FMLProxyPacket>();
    for (Object o: channelPair.get(side).outboundMessages())
    {
        list.add((FMLProxyPacket)o);
    }
    channelPair.get(side).outboundMessages().clear();
    return list;
}
项目:TRHS_Club_Mod_2016    文件:HandshakeCompletionHandler.java   
@Override
protected void channelRead0(ChannelHandlerContext ctx, CompleteHandshake msg) throws Exception
{
    NetworkDispatcher dispatcher = ctx.channel().attr(NetworkDispatcher.FML_DISPATCHER).getAndRemove();
    dispatcher.completeHandshake(msg.target);
}
项目:CauldronGit    文件:HandshakeCompletionHandler.java   
@Override
protected void channelRead0(ChannelHandlerContext ctx, CompleteHandshake msg) throws Exception
{
    NetworkDispatcher dispatcher = ctx.channel().attr(NetworkDispatcher.FML_DISPATCHER).getAndRemove();
    dispatcher.completeHandshake(msg.target);
}
项目:Cauldron    文件:HandshakeCompletionHandler.java   
@Override
protected void channelRead0(ChannelHandlerContext ctx, CompleteHandshake msg) throws Exception
{
    NetworkDispatcher dispatcher = ctx.channel().attr(NetworkDispatcher.FML_DISPATCHER).getAndRemove();
    dispatcher.completeHandshake(msg.target);
}
项目:Cauldron    文件:HandshakeCompletionHandler.java   
@Override
protected void channelRead0(ChannelHandlerContext ctx, CompleteHandshake msg) throws Exception
{
    NetworkDispatcher dispatcher = ctx.channel().attr(NetworkDispatcher.FML_DISPATCHER).getAndRemove();
    dispatcher.completeHandshake(msg.target);
}