update socket test code