Re: Loop generates never-ending sockets and threads, need help
debugging
On Feb 6, 11:16 pm, Jorgen Grahn <grahn+n...@snipabacken.se> wrote:
On Sat, 2010-02-06, Branimir Maksimovic wrote:
Kurt wrote:
While on the subject of threads and sockets, do you have
any books to recommend?
Unix network programming, Richard Stevens.
http://en.wikipedia.org/wiki/W._Richard_Stevens
Although that's for Unix, and the poster appeared to use some
other system. Stevens covers Unix and its variations, but not
e.g. Windows.
I've heard that sockets are similar enough under both that you
might be able to use some of the Stevens under Windows. I'm not
sure, however.
For threads, I think you need more than Stevens -- I don't
think he teaches you to avoid all the pitfalls which makes all
threaded code I've seen a complicated, inefficient, and broken
mess.
I'm not too familiar with this particular book of his, but in
general, Stevens delves into the details of each individual
request, and does not address architecture or larger scale
issues. The best book I've seen for threading (where program
organization is very, very critical) is _Programming with POSIX
Threads_, by David Butenhof. As the name indicates, the book is
purely Unix, but as far as I can tell, most of the issues it
explains are identical under Windows. Only the names of the
functions change.
--
James Kanze