Allow injection of socket class.

This way you can use Net::SOCKS with this by creating a small wrapper
class, for example.