#include #include #include #define PUERTO 55556 main() { char buff[255]; int s; struct sockaddr_in server_info; struct hostent *host; s=socket(AF_INET, SOCK_STREAM, 0); host=gethostbyname("148.228.22.50"); bcopy(host->h_addr, &server_info.sin_addr, host->h_length); server_info.sin_family=AF_INET; server_info.sin_port=htons(PUERTO); connect(s, (struct sockaddr *)&server_info, sizeof(server_info)); write(s, "Hola Bety como estas!", 21); read(s, buff, 9); printf("%s", buff); close(s); }