Re-implemented socket configuration.