Skip to content

ioGame 21.19 netty 分布式网络游戏服务器框架,真轻量级网络编程框架

Compare
Choose a tag to compare
@iohao iohao released this 28 Oct 01:40
· 18 commits to main since this release

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

  1. [core] FlowContext provides the setUserId method to simplify the login operation.
  2. [broker] Added RingElementSelector load balancing implementation and set it as default to replace RandomElementSelector
  3. [core] #386 Action supports constructor injection with parameters in Spring
  4. Simplify the implementation class of ActionParserListener related to ProtoDataCodec. and #386
  5. perf(i18n): 🐳 #376 cmd check tips
  6. 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>