socket improvements