Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people, just like you, are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
Solved

Understanding websocket example in spring

Posted on 2016-09-27
1
89 Views
Last Modified: 2016-10-14
HI,
I am using hte websocket example on : https://spring.io/guides/gs/messaging-stomp-websocket/
when i click on the connect button on the web page which loads when this application code is run the following code executes :
function connect() {
    var socket = new SockJS('/gs-guide-websocket');
    stompClient = Stomp.over(socket);
    stompClient.connect({}, function (frame) {
        setConnected(true);
        console.log('Connected: ' + frame);
        stompClient.subscribe('/topic/greetings', function (greeting) {
            showGreeting(JSON.parse(greeting.body).content);
        });
    });
}

Open in new window


And i see the following two network calls in the Network tab of chrome :
http://localhost:8080/gs-guide-websocket/info?t=1474970676486
ws://localhost:8080/gs-guide-websocket/614/vbxj5iok/websocket

What do these mean and what are there purpose... what are the things in bold means and where did they come from ?


Thanks
0
Comment
Question by:Rohit Bajaj
1 Comment
 
LVL 35

Accepted Solution

by:
Kimputer earned 500 total points
ID: 41817699
When using a framework, api or other services that are meant to make things easy, you usually don't look under the hood too much. It's why you are using it in the first place, to make things easy for you.
In this case, you should check the request and the response (input name, get "hello name" back), if that's expected or not. Not really dig so deep as to what it's really sending in and out. The requests are all taken care of the backbone (in your case Spring.io), and the programmers could tell you the specifics but it would probably take quite some time for you to understand.
Usually it's a combination of time, randomness, and things to track.
0

Featured Post

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
ejb entity bean example 2 15
hashmap order 17 37
Filktering Alphabetically 8 31
Possible propagation problem 1 25
Introduction This article is the second of three articles that explain why and how the Experts Exchange QA Team does test automation for our web site. This article covers the basic installation and configuration of the test automation tools used by…
#SSL #TLS #Citrix #HTTPS #PKI #Compliance #Certificate #Encryption #StoreFront #Web Interface #Citrix XenApp
This tutorial will introduce the viewer to VisualVM for the Java platform application. This video explains an example program and covers the Overview, Monitor, and Heap Dump tabs.
The viewer will learn the basics of jQuery including how to code hide show and toggles. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery…

839 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question