Entire series for sockets
http://80x24.org/spew/20151113041012.27235-1-e%4080x24.org/t.mbox.gz

ref: [ruby-core:71439] [Feature #11339]

 benchmark/bm_accept_nonblock.rb  |  17 ++
 benchmark/bm_connect_nonblock.rb |  18 ++
 benchmark/bm_recvmsg_nonblock.rb |  16 ++
 benchmark/bm_sendmsg_nonblock.rb |  16 ++
 ext/socket/ancdata.c             | 179 +++------------
 ext/socket/basicsocket.c         |  73 ++----
 ext/socket/init.c                |  23 +-
 ext/socket/lib/socket.rb         | 479 +++++++++++++++++++++++++++++++++++++++
 ext/socket/rubysocket.h          |  26 +--
 ext/socket/socket.c              | 203 ++---------------
 ext/socket/tcpserver.c           |  48 +---
 ext/socket/udpsocket.c           |  63 +----
 ext/socket/unixserver.c          |  47 +---
 13 files changed, 659 insertions(+), 549 deletions(-)

Will commit soon