Tweak Some Code in Socket Setup
API Refactoring.