GuiProtocol ZH

From MLDonkey
Jump to: navigation, search

这个网页和连接都来源于:http://www.g2gui.net/wiki/index.php/GuiProtocol 一直被维护者维护 --Spiralvoice 06:47, 8 February 2006 (PST)

Contents

连接过程

从MLDonkey2.5-4+2(也可能更早),连接的过程规则:

一旦你从socket连接到server:


更早的连接过程:

消息基本格式

所有的整型都被小端的方式解码小端 (least significant byte first).

Size of Content (Header) Opcode Payload

int32

int16

variable-size

从core收到的Opcodes

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

发给core的Opcodes

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

从源码的到相关的信息

从mldonkey源码中得到gui协议信息可以参考以下文件:

Personal tools
Namespaces
Variants
Actions
Navigation
Toolbox