Outils pour utilisateurs

Outils du site


misc:minecraft_client

====== Différences ====== Ci-dessous, les différences entre deux révisions de la page.

Lien vers cette vue comparative

misc:minecraft_client [2011/10/31 15:55]
127.0.0.1 modification externe
misc:minecraft_client [2011/12/21 15:56] (Version actuelle)
mrhide
Ligne 4: Ligne 4:
  
 Ça peut aussi servir à ceux qui veulent savoir comment programmer un socket TCP en C. Ça peut aussi servir à ceux qui veulent savoir comment programmer un socket TCP en C.
 +
 +==== Changelog ====
 +  * 21/12/11 MàJ pour MC 1.0.0
  
 <file c mcclient.c>​ <file c mcclient.c>​
Ligne 43: Ligne 46:
  
 #define BUFSIZE 1024 #define BUFSIZE 1024
-/* Hex int of Minecraft'​s current protocol (currently ​14) */ +/* Hex int of Minecraft'​s current protocol (currently ​22) */ 
-#define PROTOC_V ​0x0000000E+#define PROTOC_V ​0x00000016
  
 /* Java Char is 2bytes and Strings in packets are prefixed with a short equals strlen of the string */ /* Java Char is 2bytes and Strings in packets are prefixed with a short equals strlen of the string */
Ligne 204: Ligne 207:
  buf[n+5] = string16->​bytes[n];​  buf[n+5] = string16->​bytes[n];​
  }  }
- n = write(sockfd,​ buf, string16->​size+14);+ n = write(sockfd,​ buf, string16->​size+21);
  if (n < 0) {  if (n < 0) {
  perror("​ERROR writing to socket"​);​  perror("​ERROR writing to socket"​);​
misc/minecraft_client.txt · Dernière modification: 2011/12/21 15:56 par mrhide