public void MessageReceive(SocketModel model) { model.Message = SerializeUtil.DesDecode <int>(model.Message as byte[]); switch (model.Command) { case LoginProtocol.LOGIN_SRES: login(model.GetMessage <int>()); break; case LoginProtocol.REG_SRES: reg(model.GetMessage <int>()); break; } }
public void MessageReceive(UserToken token, SocketModel message) { message.Message = SerializeUtil.DesDecode <AccountInfoDTO>(message.Message as byte[]); switch (message.Command) { case LoginProtocol.LOGIN_CREQ: login(token, message.GetMessage <AccountInfoDTO>()); break; case LoginProtocol.REG_CREQ: reg(token, message.GetMessage <AccountInfoDTO>()); break; } }