Showing posts with label Socket Programming - 22. Show all posts
Showing posts with label Socket Programming - 22. Show all posts

Monday, 14 January 2013

Miscellaneous Routines


Miscellaneous Routines

● int getpeername(int sockfd, struct sockaddr
*addr, int *addrlen);
– Will tell who is at the other end of a connected
stream socket and store that info in addr
● int gethostname(char *hostname, size_t size);
– Will get the name of the computer your program is
running on and store that info in hostname