Hey, nice u doing progress on that.
On Packet identifiers clarification, note that in c++ enums acts as an incremental definition, take a look at enum DefaultMessageIDTypes, first one will be id 0, next one 1, next 2... take a look...
theres (i think) 162 reserved ids of possible 512. you can use anyone in range of 162-512 with any data u want.
BitStream implementation helps turning lua vars into native types and vice versa. for example, you want to send the number "22" if you send it as string it will take 8 bytes in the packet. but if you choose TUINT8 type it will use only 1 byte.
Using those types depends on your architecture but use always the less you can, sync will be faster. note that types are like c++ ms ones.
TBOOL - 1/0(TRUE/FALSE) (1Byte)
TUINT8 - 0 TO +512 (1byte)
TINT8 -256 TO +256 (1 byte)
TUINT16 - -32,768 - +32,767 (2 bytes)
TINT16 - 0 - +65,534 (2 bytes)
TUINT32 −2,147,483,648 to 2,147,483,647 (4 bytes)
TINT32 - 0 to 4,294,967,295 (4bytes)
TFLOAT - any decimal number (4 bytes)
TSTRING - any string (max 512 chars - each char is a byte + 1 for string lenght)
design your packet structure using less bytes possible.
Btw, all those plugins are lua modules and not ams plugins, so they can run in any lua app, not only on ams (but on ams too). also can be used on luajit or standard vm.
The http interface just rely on a function "string OnHTTP (headers, ip)" it will recieve http headers as string and the ip. you just return a string that is the content. theres no binary support on output so sending images and files will be hard but httpinterface is very weak part of raknet and i encourage of use 3rd party place to store images and assets and use this just to generate html static content. As its running on same enviroment, you can show on the static content info about current server data and users connected to it.
Ive used the client to connect to SA-MP servers (gta:sa) with minimal changes, and spawn fake bots on the game. Its perfectly good for gaming engines and realtime communications. RakNet has lots of plugins like RakVoice to stream audio/video and Nat hole punching to do p2p networking so everithing is fork the code and add those plugins and implementations on lua api.