Training with getaddrinfo function

wrote a test program to play with sockets in unix os