https://youngmonkeys.org/ezyfox-sever/
Ezyfox Server is a socket server. It supports TCP, UDP and Websocket protocol. It also provides manipulation beans, auto binding, auto implementation and more utilities.
<dependency>
<groupId>com.tvd12</groupId>
<artifactId>ezyfox-server-embedded</artifactId>
<version>1.1.4</version>
</dependency>
Ezyfox Server's benchmark with 1000 CCU broadcast messages in 1 hour on one VPS ram 512MB, CPU 1 core
1. Create an app entry
public static class HelloAppEntry extends EzySimpleAppEntry {
@Override
protected String[] getScanableBeanPackages() {
return new String[] {
"com.tvd12.ezyfoxserver.embedded.test" // replace by your package
};
}
@Override
protected String[] getScanableBindingPackages() {
return new String[] {
"com.tvd12.ezyfoxserver.embedded.test" // replace by your package
};
}
@Override
protected EzyAppRequestController newUserRequestController(EzyBeanContext beanContext) {
return EzyUserRequestAppSingletonController.builder()
.beanContext(beanContext)
.build();
}
}
2. Create a plugin entry
public static class HelloPluginEntry extends EzySimplePluginEntry {
@Override
protected String[] getScanableBeanPackages() {
return new String[] {
"com.tvd12.ezyfoxserver.embedded.test" // replace by your package
};
}
}
3. Setup
EzyPluginSettingBuilder pluginSettingBuilder = new EzyPluginSettingBuilder()
.name("hello")
.addListenEvent(EzyEventType.USER_LOGIN)
.entryLoader(HelloPluginEntryLoader.class);
EzyAppSettingBuilder appSettingBuilder = new EzyAppSettingBuilder()
.name("hello")
.entryLoader(HelloAppEntryLoader.class);
EzyZoneSettingBuilder zoneSettingBuilder = new EzyZoneSettingBuilder()
.name("hello")
.application(appSettingBuilder.build())
.plugin(pluginSettingBuilder.build());
EzySimpleSettings settings = new EzySettingsBuilder()
.zone(zoneSettingBuilder.build())
.build();
4. Create and start a server
EzyEmbeddedServer server = EzyEmbeddedServer.builder()
.settings(settings)
.build();
server.start();
You can find full example here
We are game server developers, We have a lot of online games and We must buy game server engine like SmarfoxServer or Photon but they are really expensive. We need make a change to help us and everyone. Free is good idea and We make Ezyfox server
mvn test
- Apache License, Version 2.0