use of com.tvd12.ezyfoxserver.nio.builder.impl.EzyWebSocketSecureServerCreator in project ezyfox-server by youngmonkeys.
the class EzyWebSocketSecureServerCreatorTest method test.
@Test
public void test() throws Exception {
SSLContext sslContext = SSLContext.getDefault();
EzySimpleWebSocketSetting webSocketSetting = new EzySimpleWebSocketSetting();
EzyWebSocketSecureServerCreator creator = new EzyWebSocketSecureServerCreator(sslContext);
creator.setting(webSocketSetting);
creator.create();
EzyWsHandler wsHandler = MethodInvoker.create().object(creator).method("newWsHandler").invoke(EzyWsHandler.class);
WebSocketCreator webSocketCreator = MethodInvoker.create().object(creator).method("newWebSocketCreator").param(EzyWsHandler.class, wsHandler).invoke(WebSocketCreator.class);
webSocketCreator.createWebSocket(null, null);
}
Aggregations