public static void Welcome(int toClient, string msg) { ServerHandle.InitializeHandlers(); using (Packet packet = new Packet((int)ServerPackets.Welcome)) { packet.Write(msg); packet.Write(toClient); SendTCPData(toClient, packet); } }
static void Main(string[] args) { Console.Title = "TicTacToeServer"; isRunning = true; Thread mainThread = new Thread(new ThreadStart(MainThread)); mainThread.Start(); Server.Start(50, 26950); ServerHandle.InitializeHandlers(); }