|
|
|
|
|
by cturner
5008 days ago
|
|
I found that opening a socket and using select is pretty straightforward. When I write an app, the head-scratching is generally over how to build an event-loop to juggle all the stuff I have going on. Most of the time when I write a tool it will need to do this, but I haven't seen any good books that cover it. Are there any book recommendations about taking the next step? i.e. Structuring your application so you do regular reads and writes, sleep at sensible times so you aren't sledging the host, useful message-passing patterns. That talk about the tradeoffs, and optimisations, whether you should be doing one select per loop, or trying to do a greedy read on each pass, possibly even running select a few times in order to get that data in. Stevens volume I seems like it would have been a good place for this, maybe it's out of scope. It focuses on ways you can use the unix API, but avoids straying into application design issues. |
|