@Override protected void server(Consumer<TtyConnection> onConnect) { if (bootstrap != null) { throw failure("Server already started"); } bootstrap = new NettyWebsocketTtyBootstrap().setHost("localhost").setPort(8080); try { bootstrap.start(onConnect).get(10, TimeUnit.SECONDS); } catch (Exception e) { throw failure(e); } }
@Override protected void server(Consumer<TtyConnection> onConnect) { if (bootstrap != null) { throw failure("Server already started"); } bootstrap = new NettyWebsocketTtyBootstrap().setHost("localhost").setPort(8080); try { bootstrap.start(onConnect).get(10, TimeUnit.SECONDS); } catch (Exception e) { throw failure(e); } }
@Override protected void server(Consumer<TtyConnection> onConnect) { if (bootstrap != null) { throw failure("Server already started"); } bootstrap = new NettyWebsocketTtyBootstrap().setHost("localhost").setPort(8080); try { bootstrap.start(onConnect).get(10, TimeUnit.SECONDS); } catch (Throwable e) { throw failure(e); } }