jMoule : protocol

In order to write jMoule, I add to understand the mlDonkey Core/Gui protocol.
The file "interface_protocol.txt" in mlDonkey's sources gives some information about this protocol but his still incomplete so I wrote this page... I hope you will find it useful :)
Anyway this document is not a reference and many options are not used or not explained... if you want to know everything you should read the "guiEncoding.ml" file in the source distribution.

First you need to connect to the mlDonkey Core (using TCP socket on port 4001).
Then you can start reading and sending binary messages from and to the Core with the following structure :

Size of contentContent
FunctionParameters
Long (4 bytes)Int (2 bytes)(Size of content - 2) bytes


List of types used in this protocol :
Messages you receive from the Core (this currently only lists the messages I use in jMoule...) :
Messages you can send to the Core (this currently only lists the messages I use in jMoule...) :