private void HandleMessage(long sessionId, SimpleChat.CMsgHello req) { ChatClient client = null; _clients.TryGetValue(sessionId, out client); SimpleChat.SMsgHello ack = new SimpleChat.SMsgHello(); if (client != null) { client.Account = req.account; ack.returnValue = SimpleChat.SMsgHello.RET.OK; } else { ack.returnValue = SimpleChat.SMsgHello.RET.FAILED; } SendMessage(sessionId, SimpleChat.MESSAGE_ID.SMSG_HELLO, ack); }
private void HandleMessage(long sessionId, SimpleChat.SMsgHello msg) { Console.WriteLine("HELLO 결과 - {0}", msg.returnValue.ToString()); }