title: Spring Boot websocket connection timing out
body: <p>The problem I am having is that whenever I try to connect to my spring boot application from an external computer on the same LAN, my WebSocket connection times out. I should also ask if spring boot is the right tool in order to only host my app server. My actual webpage will be hosted from a different machine and this could partially be the problem.</p>
  
  <p>This is what my Java code looks like:</p>
  
  <pre><code>@Configuration
  @EnableWebSocket
  @EnableAutoConfiguration
  public class CinderApp implements WebSocketConfigurer {
  
  final static String DEFAULT_APP_SERVER_URL = "http://localhost:8080";
  
  @Bean
  public MessageHandler callHandler() {
      return new MessageHandler();
  }
  
  @Override
  public void registerWebSocketHandlers(WebSocketHandlerRegistry registry) {
      registry.addHandler(callHandler(), "/call");
  }
  </code></pre>
  
  <p>And on the browser client end I have the javascript:</p>
  
  <pre><code>var ws = new WebSocket('ws://' + "192.168.1.112:8080" + '/call');
  </code></pre>
  
  <p>Where 192.168.1.112 is the ip spring boot application server.</p>
  
  <p>This connection fails after the timeout period and returns a fault. I would just like to know how I can establish a websocket connection with the spring boot app server from an external ip browser(on the same LAN).</p>