ENH: add test case for testing socket