Added disconnect method to the socket wrapper

So the library can be used when endpoints come and go