that's just being lazy to write down a program :P

i prefer writing:
---

int sockfd;
if ((sockfd = socket(AF_INET, SOCK_STREAM, 0)) == -1) {
perror("socket");
return 1;
}

sockaddr_in server_addr;
server_addr.sin_port = htons(PORT);
server_addr.sin_addr.s_addr = inet_aton(SERVERADDRESS);
server_addr.sin_family = AF_INET;
memset(&(server_addr.sin_zero), '\0', 8);

if (connect(sockfd, (sockaddr *) &server_addr, sizeof (sockaddr)) == -1) {
perror("connect");
return 1;
}

//and other code here
//etc.
//etc.
//etc.

close(sockfd);
-------------


who am i kidding!?!?! :P laugh

no seriously, i like writing down the program... ahem, i got it all automated laugh

*looks at his libs*


My ally is the compiler, and a powerful ally it is!