There are several chunks of code - like this one, much of the code for creating and closing the dummy sockets that should probably be extracted into members of the base class, since they're shared by both implementations.