GuiProtocol

From MLDonkey
Jump to: navigation, search

This page and its links are copied from http://www.g2gui.net/wiki/index.php/GuiProtocol Its still work-in-progress --Spiralvoice 06:47, 8 February 2006 (PST)

Contents

Connection Phase

As of MLDonkey 2.5-4+2 (possibly earlier), the connection phase runs like so:

Once you've connected the socket to the server :


The earlier connection phase looked like this:

Basic Message Format

All integers are encoded in LittleEndian (least significant byte first).

Size of Content (Header) Opcode Payload

int32

int16

variable-size

Opcodes Received from core

GuiOpcode Name Notes
00 CoreProtocol
01 OptionsInfo
03 DefineSearches
04 ResultInfo
05 SearchResult
09 FileUpdateAvailability
10 FileAddSource
12 ServerUser
13 ServerState
15 ClientInfo
16 ClientState only the state of the client has changed
19 ConsoleMessage
20 NetworkInfo
21 UserInfo
22 RoomInfo for protocol version <=3
23 RoomMessage
24 RoomAddUser
26 ServerInfo
27 MessageFromClient
28 ConnectedServers
31 RoomInfo for protocol version >3
34 SharedFileUpload
35 SharedFileUnshared
36 AddSectionOption define a new option to appear in the Settings panel
38 AddPluginOption define a new option to appear in the Settings panel
46 FileDownloadUpdate
47 BadPassword
48 SharedFileInfo also opcodes 33 for old protocol versions
49 ClientStats also opcodes 25,37,39 for old protocol versions
50 FileRemoveSource
51 CleanTables
52 FileInfo also opcodes 7,40, 43 for old protocol versions
53 DownloadingFiles also old opcodes 29, 41, 44 for old protocol versions
54 DownloadedFiles also opcodes 30, 42, 45 for old protocol versions
55 Uploaders
56 Pending
57 Search
58 Version
59 Stats protocol > 40

Opcodes sent to core

GuiOpcode Name Notes
00 ProtocolVersion
01 ConnectMore
02 CleanOldServers
03 KillServer
04 ExtendedSearch
08 DlLink
09 RemoveServer
10 SaveOptions
11 RemoveDownload
12 GetServerUsers
13 SaveFileAs rename file
14 AddClientFriend
15 AddUserFriend
16 RemoveFriend
17 RemoveAllFriends
18 FindFriend
19 ViewUsers
20 ConnectAll
21 ConnectServer
22 DisconnectServer
23 SwitchDownload
24 VerifyAllChunks
25 QueryFormat
26 ModifyMp3Tags
27 CloseSearch
28 SetOption
29 ConsoleCommand
30 Preview
31 ConnectFriend
32 GetServerUsers
33 GetClientFiles
34 GetFileLocations
35 GetServerInfo
36 GetClientInfo
37 GetFileInfo
38 GetUserInfo
40 EnableNetwork
41 BrowseUser
42 SearchQuery
43 MessageToClient
44 GetConnectedServers
45 GetDownloadingFiles
46 GetDownloadedFiles
47 GuiExtensions
49 RefreshUploadStats
50 Download
51 SetFilePriority
52 PassWord protocol_version > 14
53 CloseSearch
54 AddServer
55 MessageVersions only for protocol 18
56 RenameFile
57 GetUploaders
58 GetPending
59 GetSearches
60 GetSearch
61 ConnectClient
62 DisconnectClient
63 NetworkMessage
64 InterestedInSources
65 GetVersion
68 GetStats protocol > 40

Get information from source

To get information about the gui protocol from mldonkey's source code take a look at following files:

MLDonkeyDemo

MLDonkeyDemo is a simple implementation of the GUIProtocol (in python), which is used to comunicate with an instance of mldonkey-server.

To access the MLDonkeyDemo code, please visit svn://ccsl.ime.usp.br/DonkeySurvey/mldonkeydemo/

Personal tools
Namespaces
Variants
Actions
Navigation
Toolbox