Answer the question
In order to leave comments, you need to log in
How to write a simple web socket in java?
In principle, I understand what sockets are at the theoretical level
. But how can I implement them?
I installed spring, the hello world application starts up,
now I'm wondering, according to what scheme
I can write code so that
one method listens to the address endlessly and receives any messages,
the other method sends them,
that is, should I put a local server somewhere?
$ static
serving "." at http://127.0.0.1:8080
Answer the question
In order to leave comments, you need to log in
and how can my code listen to exactly this address and port
one method endlessly listened to the address and received any messages
another method sent them
And both are in Spring i.e. server side? What's the point? Then one is needed in Spring ("server"), but the other in the browser, that is, in JS, Flash, or a Java applet ("client").
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question