translated PracticalSocket.h