Correct the IP address displayed by server

Server shows wrong IP address it listens to before. It shows 0.0.0.0
while it is listening to localhost and vice versa. Also, we don't need
another var only for displaying, just getting the var what server really
got is enough.
Merge pull request #755 from changyuheng/pr-correctness-bind-ip

Correct the IP address displayed by server