ioGame 21.19 netty 分布式网络游戏服务器框架,真轻量级网络编程框架
Documentation and Logs
Releases: 1 to 2 versions are released every month, and upgrades within a major version are always compatible, such as 21.1 is upgraded to any higher version 21.x
Version update summary
- [core] FlowContext provides the setUserId method to simplify the login operation.
- [broker] Added RingElementSelector load balancing implementation and set it as default to replace RandomElementSelector
- [core] #386 Action supports constructor injection with parameters in Spring
- Simplify the implementation class of ActionParserListener related to ProtoDataCodec. and #386
- perf(i18n): 🐳 #376 cmd check tips
- refactor(external): simplify and improve externalCache
[core] FlowContext provides the setUserId method to simplify the login operation.
@ActionController(LoginCmd.cmd)
public class TheLoginAction {
... ...
@ActionMethod(LoginCmd.login)
public UserInfo loginVerify(LoginVerify loginVerify, FlowContext flowContext) {
long userId = ...;
// Deprecated
boolean success = UserIdSettingKit.settingUserId(flowContext, userId);
// now
boolean success = flowContext.setUserId(userId);
return ...;
}
}
[core] #386 Action supports constructor injection with parameters in Spring
// Action supports constructor injection in Spring.
@Component
@AllArgsConstructor
@ActionController(PersonCmd.cmd)
public class PersonAction {
final PersonService personService;
...
}
refactor(external): simplify and improve externalCache
// create externalCache
private static void extractedExternalCache() {
// Deprecated
DefaultExternalCmdCache externalCmdCache = new DefaultExternalCmdCache();
// now
var externalCmdCache = ExternalCmdCache.of();
}
[other updates]
<netty.version>4.1.114.Final</netty.version>