Long time no see guys, got a few questions going forward as I have a project I'd like to start on, but I'm not going to talk about that so much until I actually find out if I can do it or not, so here's my questions. 1. is https://github.com/po-devs/pokemon-online/wiki/Network-Protocol current? 2. (Assuming 1 is accurate): 4 bytes for the packet length l. First byte is l/256*256*256, last byte is l modulo 256 4 bytes, so is this an integer, which I modify the first and last bytes for first? If not, what is the proper way to read the packet length? Thanks!
All you need to do, is read the first 4 bytes, then unpack it as a long integer in whatever language you use. I use Python and how it's done there is Code (PYTHON): length = socket.recv(4) #first four bytes length = struct.unpack("!I", length)[0] #gets the long integer, I = fmt character for long integer data = socket.recv(length) # gets the rest of the data And sending you just need to pack it up in the same way