M
M
Meridian3122014-06-15 15:20:52
Java
Meridian312, 2014-06-15 15:20:52

What is the best way to organize the Java TCP multi-threaded server protocol and how to organize sessions to associate resources with each connection?

I read the Internet, simple implementations of protocols are shown (rules for processing sockets and data), I want to know how best to process sockets?
To be more clear, there is a Server socket waiting for sockets, then it delegates all the work to the new child thread. This main thread exchanges objects in the same way as on the client. In addition, the client can send files over the socket.
How can I make it so that I can perform multitasking via a socket (sending objects and transferring files), despite the fact that they do not overlap, but are a logical part of each connection (Session)

Answer the question

In order to leave comments, you need to log in

1 answer(s)
O
Ololesha Ololoev, 2014-06-15
@alexeygrigorev

Maybe you need HTTP and Tomcat? All of the above is there.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question