Home » Community » Newbie corner » ERROR: INVALID UTP-8 SEQUENCE: n Ya que el equpo d
ERROR: INVALID UTP-8 SEQUENCE: n Ya que el equpo d [message #44442] |
Thu, 12 March 2015 18:15  |
nietzfock
Messages: 3 Registered: March 2015
|
Junior Member |
|
|
"ERROR: INVALID UTP-8 SEQUENCE: n Ya que el equpo d"...¿why?
why the code throws the error?
void iniciarConeccion(char nombreMaquina[],char paisMaquina[]){
char respuesta1[]="vacio";
char respuesta2[]="vacio";
WSAStartup(MAKEWORD(2,2), &wsa);
Winsock=WSASocket(AF_INET,SOCK_STREAM,IPPROTO_TCP,NULL,(unsi gned int)NULL,(unsigned int)NULL);
host = gethostbyname("localhost");
localIP = inet_ntoa (*(struct in_addr *)*host->h_addr_list);
direc.sin_addr.s_addr = inet_addr(localIP);
direc.sin_family=AF_INET;
direc.sin_port=htons(999);
if(Winsock==INVALID_SOCKET)
{PromptOK("ERROR ");}
if((WSAConnect(Winsock,(SOCKADDR*)&direc,sizeof(direc),N ULL,NULL,NULL,NULL))==SOCKET_ERROR){
String error=MensajeError(GetLastError());
PromptOK(error);
}
fromlen=sizeof(direc);
while(strcmp(respuesta1,"vacio")==0){
if(sendto(Winsock,nombreMaquina,sizeof(nombreMaquina),0,(str uct sockaddr *)&direc, sizeof(direc))==-1)
{
PromptOK("ERROR");
}
_sleep(5000);
recvfrom(Winsock,respuesta1,sizeof(respuesta1),0,&addr,& amp;fromlen);
}//system("PAUSE");
while(strcmp(respuesta2,"vacio")==0){
sendto(Winsock,paisMaquina,sizeof(paisMaquina),0,(struct sockaddr *)&addr, sizeof(addr));
{
PromptOK("ERROR");}
_sleep(5000);
recvfrom(Winsock,respuesta1,sizeof(respuesta1),0,&addr,& amp;fromlen);
}
WSACleanup();
}
|
|
|
|
|
|
|
|
Goto Forum:
Current Time: Sat Apr 26 22:08:57 CEST 2025
Total time taken to generate the page: 0.00875 seconds
|