Improved socket integration tests by adding functionality to socket classes.