works with hostname [example: cf0.cs.uga.edu]

changed 1024 with #define BUFFER 1024
tested on cf0.cs.uga.edu