refactor socket drivers