How can I tunnel tcp with java?

Asked

Viewed 68 times

0

The idea is this:
Create a classe that keeps an eye on us eventos of socket client and when he receives data to classe redirects to the client that is connected to app. how to do this in java?

1 answer

0

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 the InputStream of the "socket client" that receives customer 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.

... send the data to the customer using the PrintStream from the OutputStream of the "client socket".

This solution works if you are only working with sockets. But I have never worked with sockets and Servlets at the same time, but it should be the same logic.

That one link explains very well How to work with sockets

Browser other questions tagged

You are not signed in. Login or sign up in order to post.