private static void Main(string[] args) { SynContext = new SynchronizationContext(); SynchronizationContext.SetSynchronizationContext(SynContext); client = new Client(); client.StatusMessage += new EventHandler<StatusMessageArgs>(OnStatusMessage); client.Connect("127.0.0.1", 48360); while (true) { client.Update(); } }
public void InitNetwork() { client = new Client(); InitServerEvent(); InitServerMessage(); }