001 package net.minecraft.server.dedicated;
002
003 import java.io.IOException;
004 import java.net.InetAddress;
005 import net.minecraft.network.NetworkListenThread;
006 import net.minecraft.server.MinecraftServer;
007 import net.minecraft.server.ServerListenThread;
008
009 public class DedicatedServerListenThread extends NetworkListenThread
010 {
011 /** Instance of ServerListenThread. */
012 private final ServerListenThread theServerListenThread;
013
014 public DedicatedServerListenThread(MinecraftServer par1MinecraftServer, InetAddress par2InetAddress, int par3) throws IOException
015 {
016 super(par1MinecraftServer);
017 this.theServerListenThread = new ServerListenThread(this, par2InetAddress, par3);
018 this.theServerListenThread.start();
019 }
020
021 public void stopListening()
022 {
023 super.stopListening();
024 this.theServerListenThread.func_71768_b();
025 this.theServerListenThread.interrupt();
026 }
027
028 /**
029 * processes packets and pending connections
030 */
031 public void networkTick()
032 {
033 this.theServerListenThread.processPendingConnections();
034 super.networkTick();
035 }
036
037 public DedicatedServer getDedicatedServer()
038 {
039 return (DedicatedServer)super.getServer();
040 }
041
042 public void func_71761_a(InetAddress par1InetAddress)
043 {
044 this.theServerListenThread.func_71769_a(par1InetAddress);
045 }
046
047 public MinecraftServer getServer()
048 {
049 return this.getDedicatedServer();
050 }
051 }