@Test void createServerLauncherWithSocket() throws IOException { LanguageServer server = new TestLanguageServer(); newSingleThreadExecutor() .submit( () -> { try { Socket socket = new Socket("127.0.0.1", 1044); assertTrue(socket.isConnected()); } catch (IOException e) { fail(e.getMessage()); } }); Launcher<LanguageClient> launcher = LangServerBootstrap.createServerLauncherWithSocket(server); assertNotNull(launcher.getRemoteProxy()); }
Launcher<LanguageClient> createServerLauncherWithSocket(@Nonnull LanguageServer server) throws IOException { try (ServerSocket serverSocket = new ServerSocket(LSP_PORT)) { LOG.info("Language server started using socket communication on port [{}]", LSP_PORT); LOG.info("Java version: " + Runtime.version()); Socket socket = serverSocket.accept(); return createServerLauncher(server, socket.getInputStream(), socket.getOutputStream()); } }
LangServerBootstrap { Launcher<LanguageClient> createServerLauncherWithSocket(@Nonnull LanguageServer server) throws IOException { try (ServerSocket serverSocket = new ServerSocket(LSP_PORT)) { LOG.info("Language server started using socket communication on port [{}]", LSP_PORT); LOG.info("Java version: " + Runtime.version()); Socket socket = serverSocket.accept(); return createServerLauncher(server, socket.getInputStream(), socket.getOutputStream()); } } }
LangServerBootstrap { Launcher<LanguageClient> createServerLauncherWithSocket(@Nonnull LanguageServer server) throws IOException { try (ServerSocket serverSocket = new ServerSocket(LSP_PORT)) { LOG.info("Language server started using socket communication on port [{}]", LSP_PORT); LOG.info("Java version: " + Runtime.version()); Socket socket = serverSocket.accept(); return createServerLauncher(server, socket.getInputStream(), socket.getOutputStream()); } }  }
LangServerBootstrap { Launcher<LanguageClient> createServerLauncherWithSocket(@Nonnull LanguageServer server) throws IOException { try (ServerSocket serverSocket = new ServerSocket(LSP_PORT)) { LOG.info("Language server started using socket communication on port [{}]", LSP_PORT); LOG.info("Java version: " + Runtime.version()); Socket socket = serverSocket.accept(); return createServerLauncher(server, socket.getInputStream(), socket.getOutputStream()); } }  static void main(String[] args); }
LangServerBootstrap { Launcher<LanguageClient> createServerLauncherWithSocket(@Nonnull LanguageServer server) throws IOException { try (ServerSocket serverSocket = new ServerSocket(LSP_PORT)) { LOG.info("Language server started using socket communication on port [{}]", LSP_PORT); LOG.info("Java version: " + Runtime.version()); Socket socket = serverSocket.accept(); return createServerLauncher(server, socket.getInputStream(), socket.getOutputStream()); } }  static void main(String[] args);  }