The idea is this:
Create a classe
that keeps an eye on the eventos
of socket client
and when it receives data to classe
it redirects to the client that is connected in app.
how to do this in java?
The idea is this:
Create a classe
that keeps an eye on the eventos
of socket client
and when it receives data to classe
it redirects to the client that is connected in app.
how to do this in java?
Create a class that keeps an eye on socket client events
Create a class that implements Runnable
, this class must have a Scanner
created from InputStream
of the "socket client" that receives client information in an "infinite" loop, this information is handled and .. .
When it receives data the class redirects (redirects what?) to the client that is connected in the app.
... sends the data to the client using PrintStream
from OutputStream
"client socket".
This workaround works only with sockets. But I've never worked with sockets and servlets at the same time, but it should be the same logic.
This link explains very well how working with sockets