I read http://www.qtcentre.org/wiki/index.p...hout_threading. So I have a small question. What's right way for server to close inactive sockets?
1. Store timestamp for every opened socket.
2. Update timestamp on every Read/Write operation.
2. Make single QTimer and by QTimer::timeout check what socket is expired.
Or:
1. Create QTimer pool for server and QTimer object for every socket.
2. Connect all timers to a single server slot slotTimeout.
3. Restart socket timer on each Read/Write operation.
3. In server slotTimeout close expired socket.
Or something else?
Bookmarks