Updating socket to add more utility methods.