Overview
Examples
Screenshots
Comparisons
Applications
Download
Documentation
Tutorials
Bazaar
Status & Roadmap
FAQ
Authors & License
Forums
Funding Ultimate++
Search on this site
Search in forums












SourceForge.net Logo
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 Go to previous message
nietzfock is currently offline  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();

}
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: How do I get a window decoration/element size
Next Topic: (Please delete) Preventing control from getting mouse input?
Goto Forum:
  


Current Time: Mon Apr 29 00:12:49 CEST 2024

Total time taken to generate the page: 0.07161 seconds