Adapting socket classes