Jump to content

Search the Community

Showing results for tags 'websocket'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • General Discussion
    • Website Management and Coding
    • Technology and the Internet
    • Philosophy, Politics, and Science
    • Art and Entertainment
    • Other Discussion
  • HelioHost
    • Questions
    • Customer Service
    • How You Can Help
  • HelioNet
    • News
    • Contact HelioNet

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


AIM


MSN


Website URL


ICQ


Yahoo


Jabber


Skype


Location


Interests

Found 8 results

  1. Hi I'm trying to send data from my Java Spring Boot backend to my frontend using webSockets StompJS. But I'm gettign the followign error in the browser console: WebSocket connection to 'ws://slimsim.heliohost.org/slimsim_ava/gs-guide-websocket/015/sxvos2r2/websocket' failed: Error during WebSocket handshake: Unexpected response code: 400Is it possible to get the server-logs? This request was made at about 2020-10-21 14:16:45. My info: Username: slimsimWAR-file: slimsim_ava.warPath: /home/slimsim/Server: johnny I have read a lot on this forum, but I can't seem to find any one who have used Stomp. It works on my locahost as well as on my last web hosting server. Does anybody have any tips? My JavaScript code is the following: connect = function() { const funk = "connect"; console.log("\n\n\n\n" + funk + ":\n"); const socketPath = thymeLeaf.contextPath + 'gs-guide-websocket'; console.log( "*** " + funk + ": socketPath", socketPath ); var socket = new SockJS( socketPath ); console.log( "*** " + funk + ": socket", socket ); stompClient = Stomp.over(socket); console.log( "*** " + funk + ": stompClient", stompClient ); stompClient.connect({}, function (frame) { // It never gets to here.... console.log( "*** " + funk + ": connected!" ); }); } And my WebSocketConfig.java file is the following: import com.slimsimapps.ava.badlog.BadLogService; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.context.annotation.Configuration; import org.springframework.messaging.simp.config.MessageBrokerRegistry; import org.springframework.web.socket.config.annotation.EnableWebSocketMessageBroker; import org.springframework.web.socket.config.annotation.StompEndpointRegistry; import org.springframework.web.socket.config.annotation.WebSocketMessageBrokerConfigurer; import org.springframework.web.socket.server.standard.TomcatRequestUpgradeStrategy; import org.springframework.web.socket.server.support.DefaultHandshakeHandler; @Configuration @EnableWebSocketMessageBroker public class WebSocketConfig implements WebSocketMessageBrokerConfigurer { @Autowired BadLogService log; @Override public void configureMessageBroker(MessageBrokerRegistry config) { log.a(config); config.enableSimpleBroker("/topic"); config.setApplicationDestinationPrefixes("/app"); log.o(config); } @Override public void registerStompEndpoints(StompEndpointRegistry registry) { log.a(registry); //registry.addEndpoint("/gs-guide-websocket").withSockJS(); registry.addEndpoint("/gs-guide-websocket") .setHandshakeHandler(new DefaultHandshakeHandler(new TomcatRequestUpgradeStrategy())) //.setAllowedOrigins( "slimsim.heliohost.org" ) .setAllowedOrigins( "*" ) .withSockJS(); log.o(registry); } } Thanks so much for any help!
  2. Hello I've finally been granted Java support on my account, and so today I tried to test out my website/game on it. I'm very new to websites, domains, etc. so my knowledge of all this is limited. That being said I've worked on my website/game for a while now, and I know it works as I have tested it on my computer. My game uses a websocket from the client side to connect to the Java websocket endpoint. I use: new WebSocket("ws://localhost:443/Hide/Server/ANY") ...on the client side to do this. "localhost" is used because this is being tested on Tomcat on the same computer; "443" because while I can set this to any number (which I have tested), it seems like the best port I could use for a non-secured connection; "Hide" is the project folder name; "Server/ANY" is the server endpoint. I've tested this many times and it works. Now to move the project/WAR file (WAR file is called "Hide-1.war") to HelioHost, I first changed the Websocket URL to: new WebSocket("ws://hhdavidh.heliohost.org/Hide/Server/ANY") I then uploaded the WAR file and deployed it. However, when I go to the URL where it's deployed at (http://hhdavidh.heliohost.org/Hide-1/) I get: WebSocket connection to 'ws://hhdavidh.heliohost.org/Hide/Server/ANY' failed: Error during WebSocket handshake: Unexpected response code: 404 I've tried port "8080" as well as other port numbers. I've tried changing the websocket URL to: new WebSocket("ws://hhdavidh.heliohost.org/Hide-1/Server/ANY") new WebSocket("ws://hhdavidh.heliohost.org/Server/ANY") new WebSocket("ws://hhdavidh.heliohost.org:8080/Hide/Server/ANY") ... ...which all come up with the same error. When trying: new WebSocket("ws://hhdavidh.heliohost.org:443/Hide/Server/ANY") ...the error is instead: WebSocket connection to 'ws://hhdavidh.heliohost.org:443/Hide/Server/ANY' failed: Connection closed before receiving a handshake response I've tried everything I can think of but now I'm stuck. Any help is appreciated!
  3. Hi all, Wonderful service so far, really happy with this website. I'm running a Java server on Tommy, and I notice that it gets restarted or put to sleep regularly. Is this intended? The server I'm running was designed to run constantly. I need to regularly access a servlet page in order to keep the matchmaking service running. Cheers, Tommygun
  4. Hello all, So far it's been pretty great to be able to use this service. I'm still learning the ropes here, I'm struggling to get my Java websocket up and running. I'm trying to run a small matchmaking service for my indie game Warpaint. I've got Java enabled on Tommy, and my .war is successfully deployed. Servelets respond as expected. I'm not sure exactly how to structure the url to access the websocket, or how to test that the program is listening for incoming websocket connections. Here's what worked at my last hosting solution: (wss://warpaint-l4dd3r.rhcloud.com:8443/socket) I'm aware that the default websocket ports, 443 / 8080 should work for Heliohost, so I'm trying this url: (wss://tommygun.heliohost.org/warpaint11/socket) But it's not working, and I'm not sure how I might continue debugging. Has anyone set up a Java websocket on here before? Best, Adam
  5. Hi all, Super cool service you've got set up. I'm trying to get it all working for me, and I'd like to ask about some logistics. I'm running a small indie game development company, and I like to run really small, light, websocket servers to do things like stats and matchmaking. That in addition to .html splash pages. I've got an existing server written in Java that I'd like to use here. I've just received access on the Tommy server, and I'm in the queue for Java support -- so that's great. I'm migrating from Openshift due to their policy changes. I'm posting here now because I have to write a new server for my next game soon, and since I'd like to use C#, ASP.NETbecomes a good choice. May I run both a Java websocket and C# websocket applications? I'm happy to donate if it all works out, this place seems like a young hacker's oasis. Best, Tommygun
  6. hi i would like to run a php websocket server in heliohost. As every tutorial said to run the php file in shell or command prompt, i know that heliohost dont provide shell and blocked the exec(), .., etc. And port are not open as i tried normal socket programming. i have recently search and find some discussion that websocket is allowed in heliohost and can choose the easier language to do that. i am wondering how to do that because websocker url look like ws://host:port/some/path as port are not allowed to open. anyone know how to do it. as discussion clearly said that websocket can be run in heliohost these are the links http://www.helionet....red-websockets/ http://www.helionet....ebsocket-setup/ please anyone can i run websocket if so how can i do it using php or other language (supported by heliohost stevie server) thanks in advance
  7. Does Helio Host offer websockets? If so, which languages can I use to create a websocket?
  8. Am I able to setup a websocket in cpanel? If I can, HOW? thanks in advance
×
×
  • Create New...