Search in sources :

Example 1 with EzyUdpServerBootstrap

use of com.tvd12.ezyfoxserver.nio.EzyUdpServerBootstrap in project ezyfox-server by youngmonkeys.

the class EzyUdpServerBootstrapTest method test.

@Test
public void test() throws Exception {
    EzySimpleServerContext context = new EzySimpleServerContext();
    EzySimpleServer server = new EzySimpleServer();
    EzySimpleSettings settings = new EzySimpleSettings();
    server.setSettings(settings);
    context.setServer(server);
    EzyHandlerGroupManager handlerGroupManager = mock(EzyHandlerGroupManager.class);
    EzyUdpServerBootstrap bootstrap = EzyUdpServerBootstrap.builder().serverContext(context).handlerGroupManager(handlerGroupManager).build();
    bootstrap.start();
    Thread.sleep(250);
    bootstrap.destroy();
}
Also used : EzySimpleServer(com.tvd12.ezyfoxserver.EzySimpleServer) EzySimpleServerContext(com.tvd12.ezyfoxserver.context.EzySimpleServerContext) EzyHandlerGroupManager(com.tvd12.ezyfoxserver.nio.wrapper.EzyHandlerGroupManager) EzyUdpServerBootstrap(com.tvd12.ezyfoxserver.nio.EzyUdpServerBootstrap) EzySimpleSettings(com.tvd12.ezyfoxserver.setting.EzySimpleSettings) Test(org.testng.annotations.Test)

Aggregations

EzySimpleServer (com.tvd12.ezyfoxserver.EzySimpleServer)1 EzySimpleServerContext (com.tvd12.ezyfoxserver.context.EzySimpleServerContext)1 EzyUdpServerBootstrap (com.tvd12.ezyfoxserver.nio.EzyUdpServerBootstrap)1 EzyHandlerGroupManager (com.tvd12.ezyfoxserver.nio.wrapper.EzyHandlerGroupManager)1 EzySimpleSettings (com.tvd12.ezyfoxserver.setting.EzySimpleSettings)1 Test (org.testng.annotations.Test)1