Added error checking for recv(), getaddrinfo(), socket(), and connect().
Also added #define for recieve buffer.