make some changes to socket config, and examples