static void Main(string[] args) { Console.WriteLine("[Client]"); try { dora.Connect("127.0.0.1", 8888); } catch (Exception e) { Console.WriteLine(e.Message); } Console.ReadLine(); }
//---------------------------------------------------------- // Public interface methods for UI //---------------------------------------------------------- public void OnLoginButtonClick() { enableLoginUI(false); doraemon = new Doraemon(); doraemon.AddEventListener(DoraemonEvent.CONNECTION, OnConnection); doraemon.AddEventListener(DoraemonEvent.CONNECTION_LOST, OnConnectionLost); doraemon.AddEventListener(DoraemonEvent.LOGIN, OnLogin); doraemon.AddEventListener(DoraemonEvent.LOGIN_ERROR, OnLoginError); doraemon.AddEventListener(DoraemonEvent.ROOM_JOIN, OnRoomJoin); doraemon.AddEventListener(DoraemonEvent.ROOM_JOIN_ERROR, OnRoomJoinError); // Connect to SFS2X doraemon.Connect(Host, TcpPort); }