I need TCPServer, who should:
- accept and maintain a connection of clients
- send to client response for their requests
- send to client responses from redis database
I don’t know how to correct do this.
If i do something like this:
Thread.start(server.accept) do |client|
# get requests
# send responses
I have 3 threads for each client…
Maybe is possible to solve a problem without a threads or use global
threads (not for each client).