On Jun 24, 2009, at 16:04 , Johan Tibell wrote:
On Wed, Jun 24, 2009 at 9:43 PM, Job Vranish <jvranish@gmail.com> wrote:
A search in google images for sockets state diagram comes up with some relatively good ones
http://images.google.com/images?hl=en&um=1&sa=3&q=sockets+state+diagram&btnG=Search+images
Most of them are just the TCP connection state logic, but I'm sure I'd find others there if I looked closer.

I tried this search and did look closer but I only find TCP state diagrams and other non-related diagrams. :(

This is what happens when I write while my sinuses are trying to convince me that I am drunk :/ 

The more accurate version of what I said is "the BSD socket protocol is a direct reflection of the TCP state diagram; UDP and other socket types are hacked on top of it and can be a poor fit".  Studying the TCP state diagram should make it clear why sockets work as they do, but all the rules go out the window if you're not doing TCP.

-- 
brandon s. allbery [solaris,freebsd,perl,pugs,haskell] allbery@kf8nh.com
system administrator [openafs,heimdal,too many hats] allbery@ece.cmu.edu
electrical and computer engineering, carnegie mellon university    KF8NH