[WIP] client socket updates

This is a work in progress, using this pull-request for tracking/sanity.