debug for socket