Ahweb
Messages postés48Date d'inscriptionlundi 2 août 2004StatutMembreDernière intervention15 octobre 2007
-
15 avril 2006 à 11:26
Ahweb
Messages postés48Date d'inscriptionlundi 2 août 2004StatutMembreDernière intervention15 octobre 2007
-
16 avril 2006 à 00:38
Salut !
Je fais actuellement un serveur pour un prog c++ (utilisant SDL et SDL_net avec Winsock) et j'ai besoin de recevoir ça (entre autres ^^) :
str[0]=SEND_VERSION;
*((short *)(str+1))=SDL_SwapLE16((short)version_first_digit);
*((short *)(str+3))=SDL_SwapLE16((short)version_second_digit);
str[5]=client_version_major;
str[6]=client_version_minor;
str[7]=client_version_release;
str[8]=client_version_patch;
// no byte swapping needed for Macs because of how the bytes are written
str[9]=ip->host&0xFF;
str[10]=(ip->host >> 8)&0xFF;
str[11]=(ip->host >> 16)&0xFF;
str[12]=(ip->host >> 24)&0xFF;
str[13]=ip->port&0xFF;
str[14]=(ip->port >> 8)&0xFF;
my_tcp_send(my_socket,str,15);
}
Le problème ets le suivant : sur une textbox en VB ça me donne un truc incompréhensible (par contre la longueur du texte avec Len() est longue)...
Auriez-vous une idée de comment faire pour obtenir chacun des arrays envoyés ? Merci!