Código:
Saludos. #include <stdio.h> #include <winsock.h> void main(void) { WORD wVersionRequested; WSADATA wsaData; wVersionRequested = MAKEWORD(1, 1); WSAStartup(wVersionRequested, &wsaData); struct sockaddr_in my_addr; int s = socket(AF_INET,SOCK_STREAM,0); my_addr.sin_family = AF_INET; my_addr.sin_port =htons(80); my_addr.sin_addr.s_addr=inet_addr("66.102.9.104"); memset(&(my_addr.sin_zero),'\0',8); if(connect(s, (struct sockaddr *)&my_addr, sizeof(struct sockaddr_in))==-1) { printf("error"); } getchar(); }