r3304: changed the API to lib/socket/ a little.