fixes #9, and closes #10 : Merged socketmanager and customsocket