> Hi Alex, thanks for your answer but I don't understand very well (the first question is fine), sorry. I pretend to develop a TcpServer for that i started with an example, but when i test the TimeServer example (included in the library), i see the number of threads (LWP) increment, that is correct while i send multiple connections, but when i don't send more connections, the LWP should come back to the initial state (4 LWP).
You shall see the behavior you expect once you let the thread count to go back by allowing the TimeServerConnection handler thread to complete execution. Since in your code you keep on looping in the TimeServerConnection::run() function, every request that you send creates a new TimeServerConnection handler with its own run() method that loops and keeps that thread running.
> You suggest me, to use DialogSocket but I read that this class put CRLF to the messages and I don't want that.
In that case, you will have to come up with your own design.
> Say me, It's correct how work this example??? or there is something wrong, maybe is there anything more that i have to take in consideration?
There is nothing wrong with the example. You should take into consideration my explanation for the behavior you are seeing. As I have already mentioned, had you not changed the original sample code, it would have given you the results you expect. So, at this point, probably the best thing is to do is go back to the original sample code and try to get a feeling of what is going on in the code.
Also, you may want to read [url=http://www.appinf.com/poco/documentation/PoCoSamples.pdf|Getting Started With the Samples] or http://www.appinf.com/poco/wiki/tiki-index.php?page=tutorialtcpsockets]Sockets Tutorial[/url