Yes, I find the answer, Setsockopt can ONLY be used before bind, If after bind, the socket will not release the port after close.
I met a new problem here: when I compile the program, I find
the following error. What does it mean?
Undefined first referenced
symbol...