I\'ve opened a TCP socket server (I\'ve omitted a few stuff, it is taken from here
sockfd = socket(p->ai_family, p->ai_socktype, p->ai_p
The address of the server is up to you.
Depends on which parameters are passed to the bind() function.
bind()
You can specify a single ip or bind your socket to every address of your host.
single ip
Look at the Bind man page