diff --git a/GameServer/Program.cs b/GameServer/Program.cs index fb7a2b6..b8b45c5 100644 --- a/GameServer/Program.cs +++ b/GameServer/Program.cs @@ -14,21 +14,12 @@ namespace GameServer private static ConcurrentDictionary clients = new ConcurrentDictionary(); public static SubscriberSocket ToClientSubscriber; public static PublisherSocket ToClientPublisher; - static string subPort = ""; - static string pubPort = ""; static void Main(string[] args) { Task.Run(RunServer); ToClientPublisher = new PublisherSocket(); ToClientPublisher.Bind("tcp://*:8888"); - ToClientSubscriber = new SubscriberSocket(); - ToClientSubscriber.Bind("tcp://*:8889"); - ThreadStart start1 = new ThreadStart(ReciveFormRoomSyncArea); - Thread thread1 = new Thread(start1); - thread1.IsBackground = true; - thread1.Start(); - thread1.Join(); } static async Task RunServer() @@ -160,27 +151,6 @@ namespace GameServer client.Close(); } - static void ReciveFormRoomSyncArea() - { - while (true) - { - List frameByte = new List(); - if (ToClientSubscriber.TryReceiveMultipartBytes(ref frameByte)) - { - if (!ToClientPublisher.SendMoreFrame(frameByte[0]).TrySendFrame(frameByte[1])) - { - Console.WriteLine("发送消息错误:" + frameByte[0]); - } - } - } - } - } - - [Serializable] - public class st_Motions - { - public string area; - public int m_iOperaType; - public byte[] m_sOperaData; + } } \ No newline at end of file