Java 类net.minecraft.network.NetLoginHandler 实例源码

项目:RuneCraftery    文件:ThreadLoginVerifier.java   
public void run() {
   try {
      String var1 = (new BigInteger(CryptManager.func_75895_a(NetLoginHandler.func_72526_a(this.field_72590_a), NetLoginHandler.func_72530_b(this.field_72590_a).func_71250_E().getPublic(), NetLoginHandler.func_72525_c(this.field_72590_a)))).toString(16);
      URL var2 = new URL("http://session.minecraft.net/game/checkserver.jsp?user=" + URLEncoder.encode(NetLoginHandler.func_72533_d(this.field_72590_a), "UTF-8") + "&serverId=" + URLEncoder.encode(var1, "UTF-8"));
      BufferedReader var3 = new BufferedReader(new InputStreamReader(var2.openConnection(NetLoginHandler.func_72530_b(this.field_72590_a).func_110454_ao()).getInputStream()));
      String var4 = var3.readLine();
      var3.close();
      if(!"YES".equals(var4)) {
         this.field_72590_a.func_72527_a("Failed to verify username!");
         return;
      }

      NetLoginHandler.func_72531_a(this.field_72590_a, true);
   } catch (Exception var5) {
      this.field_72590_a.func_72527_a("Failed to verify username! [internal error " + var5 + "]");
      var5.printStackTrace();
   }

}
项目:RuneCraftery    文件:ServerListenThread.java   
public void func_71766_a() {
   List var1 = this.field_71775_b;
   synchronized(this.field_71775_b) {
      for(int var2 = 0; var2 < this.field_71775_b.size(); ++var2) {
         NetLoginHandler var3 = (NetLoginHandler)this.field_71775_b.get(var2);

         try {
            var3.func_72532_c();
         } catch (Exception var6) {
            var3.func_72527_a("Internal server error");
            this.field_71771_f.func_71746_d().func_98033_al().func_98235_b("Failed to handle packet for " + var3.func_72528_e() + ": " + var6, var6);
         }

         if(var3.field_72539_c) {
            this.field_71775_b.remove(var2--);
         }

         var3.field_72538_b.func_74427_a();
      }

   }
}
项目:RuneCraftery    文件:ServerListenThread.java   
public void run()
{
    while (this.myNetworkListenThread.isListening)
    {
        try
        {
            Socket socket = this.myServerSocket.accept();
            NetLoginHandler netloginhandler = new NetLoginHandler(this.myNetworkListenThread.getServer(), socket, "Connection #" + this.connectionCounter++);
            this.addPendingConnection(netloginhandler);
        }
        catch (IOException ioexception)
        {
            ioexception.printStackTrace();
        }
    }

    this.myNetworkListenThread.getServer().getLogAgent().logInfo("Closing listening thread");
}
项目:RuneCraftery    文件:ServerListenThread.java   
private void addPendingConnection(NetLoginHandler par1NetLoginHandler)
{
    if (par1NetLoginHandler == null)
    {
        throw new IllegalArgumentException("Got null pendingconnection!");
    }
    else
    {
        List list = this.pendingConnections;

        synchronized (this.pendingConnections)
        {
            this.pendingConnections.add(par1NetLoginHandler);
        }
    }
}
项目:BetterNutritionMod    文件:ServerListenThread.java   
public void run()
{
    while (this.myNetworkListenThread.isListening)
    {
        try
        {
            Socket socket = this.myServerSocket.accept();
            NetLoginHandler netloginhandler = new NetLoginHandler(this.myNetworkListenThread.getServer(), socket, "Connection #" + this.connectionCounter++);
            this.addPendingConnection(netloginhandler);
        }
        catch (IOException ioexception)
        {
            ioexception.printStackTrace();
        }
    }

    this.myNetworkListenThread.getServer().getLogAgent().logInfo("Closing listening thread");
}
项目:BetterNutritionMod    文件:ServerListenThread.java   
private void addPendingConnection(NetLoginHandler par1NetLoginHandler)
{
    if (par1NetLoginHandler == null)
    {
        throw new IllegalArgumentException("Got null pendingconnection!");
    }
    else
    {
        List list = this.pendingConnections;

        synchronized (this.pendingConnections)
        {
            this.pendingConnections.add(par1NetLoginHandler);
        }
    }
}
项目:RuneCraftery    文件:ServerListenThread.java   
public void run() {
   while(this.field_71771_f.field_71749_b) {
      try {
         Socket var1 = this.field_71774_e.accept();
         NetLoginHandler var2 = new NetLoginHandler(this.field_71771_f.func_71746_d(), var1, "Connection #" + this.field_71773_d++);
         this.func_71764_a(var2);
      } catch (IOException var3) {
         var3.printStackTrace();
      }
   }

   this.field_71771_f.func_71746_d().func_98033_al().func_98233_a("Closing listening thread");
}
项目:RuneCraftery    文件:ServerListenThread.java   
private void func_71764_a(NetLoginHandler p_71764_1_) {
   if(p_71764_1_ == null) {
      throw new IllegalArgumentException("Got null pendingconnection!");
   } else {
      List var2 = this.field_71775_b;
      synchronized(this.field_71775_b) {
         this.field_71775_b.add(p_71764_1_);
      }
   }
}
项目:RuneCraftery    文件:ServerListenThread.java   
public void processPendingConnections()
{
    List list = this.pendingConnections;

    synchronized (this.pendingConnections)
    {
        for (int i = 0; i < this.pendingConnections.size(); ++i)
        {
            NetLoginHandler netloginhandler = (NetLoginHandler)this.pendingConnections.get(i);

            try
            {
                netloginhandler.tryLogin();
            }
            catch (Exception exception)
            {
                netloginhandler.raiseErrorAndDisconnect("Internal server error");
                FMLLog.log(Level.SEVERE, exception, "Error handling login related packet - connection from %s refused", netloginhandler.getUsernameAndAddress());
                this.myNetworkListenThread.getServer().getLogAgent().logWarningException("Failed to handle packet for " + netloginhandler.getUsernameAndAddress() + ": " + exception, exception);
            }

            if (netloginhandler.connectionComplete)
            {
                this.pendingConnections.remove(i--);
            }

            netloginhandler.myTCPConnection.wakeThreads();
        }
    }
}
项目:SevenCommons    文件:Network.java   
/**
 * gets the INetworkManager associated with the given NetHandler
 *
 * @param netHandler the NetHandler to get the INetworkManager from
 * @return the INetworkManager
 */
public static INetworkManager getNetworkManager(NetHandler netHandler) {
    if (!netHandler.isServerHandler()) {
        return SevenCommons.proxy.getNetworkManagerFromClient(netHandler);
    } else if (netHandler instanceof NetServerHandler) {
        return ((NetServerHandler) netHandler).netManager;
    } else {
        return ((NetLoginHandler) netHandler).myTCPConnection;
    }
}
项目:BetterNutritionMod    文件:ServerListenThread.java   
public void processPendingConnections()
{
    List list = this.pendingConnections;

    synchronized (this.pendingConnections)
    {
        for (int i = 0; i < this.pendingConnections.size(); ++i)
        {
            NetLoginHandler netloginhandler = (NetLoginHandler)this.pendingConnections.get(i);

            try
            {
                netloginhandler.tryLogin();
            }
            catch (Exception exception)
            {
                netloginhandler.raiseErrorAndDisconnect("Internal server error");
                FMLLog.log(Level.SEVERE, exception, "Error handling login related packet - connection from %s refused", netloginhandler.getUsernameAndAddress());
                this.myNetworkListenThread.getServer().getLogAgent().logWarningException("Failed to handle packet for " + netloginhandler.getUsernameAndAddress() + ": " + exception, exception);
            }

            if (netloginhandler.connectionComplete)
            {
                this.pendingConnections.remove(i--);
            }

            netloginhandler.myTCPConnection.wakeThreads();
        }
    }
}
项目:MC-MineAPI.Java    文件:CustomConnectionHandler.java   
@Override
public String connectionReceived(NetLoginHandler netHandler, INetworkManager manager)
{
    return null;
}
项目:WikiLink    文件:ConnectionHandler.java   
@Override
public String connectionReceived(NetLoginHandler netHandler, INetworkManager manager)
{
    return null;
}
项目:forge_world_downloader    文件:WDLConnectionHandler.java   
@Override
public String connectionReceived(NetLoginHandler netHandler,
        INetworkManager manager)
{
    return null;
}
项目:RuneCraftery    文件:ModLoaderConnectionHandler.java   
@Override
public String connectionReceived(NetLoginHandler netHandler, INetworkManager manager)
{
    return null;
}
项目:RuneCraftery    文件:ThreadLoginVerifier.java   
ThreadLoginVerifier(NetLoginHandler p_i1526_1_) {
   this.field_72590_a = p_i1526_1_;
}
项目:RuneCraftery    文件:ModLoaderConnectionHandler.java   
@Override
public String connectionReceived(NetLoginHandler netHandler, INetworkManager manager)
{
    return null;
}
项目:RuneCraftery    文件:ForgeConnectionHandler.java   
@Override
public String connectionReceived(NetLoginHandler netHandler, INetworkManager manager)
{
    return null;
}
项目:RuneCraftery    文件:ForgeConnectionHandler.java   
@Override
public String connectionReceived(NetLoginHandler netHandler, INetworkManager manager)
{
    return null;
}
项目:SkullForge    文件:ConnectionHandler.java   
@Override
public String connectionReceived(NetLoginHandler netHandler, INetworkManager manager) {
    return null;
}
项目:BetterNutritionMod    文件:ModLoaderConnectionHandler.java   
@Override
public String connectionReceived(NetLoginHandler netHandler, INetworkManager manager)
{
    return null;
}
项目:BetterNutritionMod    文件:ForgeConnectionHandler.java   
@Override
public String connectionReceived(NetLoginHandler netHandler, INetworkManager manager)
{
    return null;
}
项目:Kingdom-Keys    文件:Update.java   
@Override
public String connectionReceived(NetLoginHandler netHandler, INetworkManager manager)
{
return "";
}
项目:Too-Many-Mods    文件:CommandHandler.java   
@Override
public String connectionReceived(NetLoginHandler netHandler, INetworkManager manager) {
    return null;
}
项目:MobVsMob    文件:ConnectionHandler.java   
@Override
public String connectionReceived(NetLoginHandler netHandler, INetworkManager manager) //server
{
    return null;
}
项目:Modjam-3    文件:HackyEventHandler.java   
@Override
public String connectionReceived(NetLoginHandler netHandler, INetworkManager manager) { return null; }
项目:HudPlus    文件:HPUpdateHandler.java   
@Override
public String connectionReceived(NetLoginHandler netHandler, INetworkManager manager) {
    return null;
}
项目:SkillCraft    文件:SCPacketHandler.java   
@Override
//SERVER SIDE
public String connectionReceived(NetLoginHandler netHandler, INetworkManager manager) {
    return null;
}
项目:secri    文件:PacketHandler.java   
@Override
public String connectionReceived(NetLoginHandler netHandler, INetworkManager manager) {
    return null;
}
项目:secri    文件:ConnectionHandler.java   
@Override
public String connectionReceived(NetLoginHandler netHandler, INetworkManager manager) {
    return null;
}
项目:Nucleum-Omnium    文件:ConnectionHandler.java   
@Override
public String connectionReceived(NetLoginHandler netHandler, INetworkManager manager)
{
    return null;
}
项目:Minecraft-TomP2P    文件:ConnectionHandler.java   
/**
 * {@inheritDoc}
 */
@Override
public String connectionReceived(NetLoginHandler netHandler,
        INetworkManager manager) {
    return null;
}
项目:RuneCraftery    文件:IConnectionHandler.java   
/**
 * If you don't want the connection to continue, return a non-empty string here
 * If you do, you can do other stuff here- note no FML negotiation has occured yet
 * though the client is verified as having FML installed
 *
 * SERVER SIDE
 *
 * @param netHandler
 * @param manager
 */
String connectionReceived(NetLoginHandler netHandler, INetworkManager manager);
项目:RuneCraftery    文件:IConnectionHandler.java   
/**
 * If you don't want the connection to continue, return a non-empty string here
 * If you do, you can do other stuff here- note no FML negotiation has occured yet
 * though the client is verified as having FML installed
 *
 * SERVER SIDE
 *
 * @param netHandler
 * @param manager
 */
String connectionReceived(NetLoginHandler netHandler, INetworkManager manager);
项目:BetterNutritionMod    文件:IConnectionHandler.java   
/**
 * If you don't want the connection to continue, return a non-empty string here
 * If you do, you can do other stuff here- note no FML negotiation has occured yet
 * though the client is verified as having FML installed
 *
 * SERVER SIDE
 *
 * @param netHandler
 * @param manager
 */
String connectionReceived(NetLoginHandler netHandler, INetworkManager manager);