Adilol

getaddrinfo()

Aug 3rd, 2011
180
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.38 KB | None | 0 0
  1. #include <sys/types.h>
  2. #include <sys/socket.h>
  3. #include <netdb.h>
  4.  
  5. int getaddrinfo(const char *node,     // e.g. "www.example.com" or IP
  6.                 const char *service,  // e.g. "http" or port number
  7.                 const struct addrinfo *hints,
  8.                 struct addrinfo **res);
  9.  
  10. /*
  11. This basically connects to an IP, and display some information regarding it
  12. */
Advertisement
Add Comment
Please, Sign In to add comment