private static void InitalizeServer() { Slots = new Dictionary <int, ClientObject>(); ServerHandle.InitializeServerPacketHandlers(); for (var i = 1; i <= Config.MAX_PLAYERS; i++) { Slots.Add(i, new ClientObject(i)); } TcpListener = new TcpListener(IPAddress.Any, Config.PORT); TcpListener.Start(); TcpListener.BeginAcceptTcpClient(new AsyncCallback(TcpConnectCallback), null); UdpListener = new UdpClient(Config.PORT); UdpListener.BeginReceive(UdpReceiveCallback, null); }