moved socket library to use new object model