move socket api out of mongo driver