= Museek Plus Protocol = == Client & Daemon Messages == || Hex || Message Name || || 000 || [wiki:MuseekPlusProtocol#a0x0000 Ping] || || 001 || [wiki:MuseekPlusProtocol#a0x0001 Challenge] || || 002 || [wiki:MuseekPlusProtocol#a0x0002 Login] || 003 || [wiki:MuseekPlusProtocol#a0x0003 Server State] || || 004 || [wiki:MuseekPlusProtocol#a0x0004 Check Privileges] || || 005 || [wiki:MuseekPlusProtocol#a0x0005 Set Status] || || 010 || [wiki:MuseekPlusProtocol#a0x0010 Status Message] || || 011 || [wiki:MuseekPlusProtocol#a0x0011 Debug Message] || || 012 || [wiki:MuseekPlusProtocol#a0x0012 New Password] || || 100 || [wiki:MuseekPlusProtocol#a0x0100 Config State] || || 101 || [wiki:MuseekPlusProtocol#a0x0101 Config Set] || || 102 || [wiki:MuseekPlusProtocol#a0x0102 Config Remove] || || 103 || [wiki:MuseekPlusProtocol#a0x0103 Set User Image] || || 201 || [wiki:MuseekPlusProtocol#a0x0201 Peer Exists] || || 202 || [wiki:MuseekPlusProtocol#a0x0202 Peer Status] || || 203 || [wiki:MuseekPlusProtocol#a0x0203 Peer Statistics] || || 204 || [wiki:MuseekPlusProtocol#a0x0204 User Info] || || 205 || [wiki:MuseekPlusProtocol#a0x0205 User Shares] || || 206 || [wiki:MuseekPlusProtocol#a0x0206 Peer Address] || || 207 || [wiki:MuseekPlusProtocol#a0x0207 Give Privileges] || || 300 || [wiki:MuseekPlusProtocol#a0x0300 Room State] || || 301 || [wiki:MuseekPlusProtocol#a0x0301 Room List] || || 302 || [wiki:MuseekPlusProtocol#a0x0302 Private Message] || || 303 || [wiki:MuseekPlusProtocol#a0x0303 Join Room] || || 304 || [wiki:MuseekPlusProtocol#a0x0304 Leave Room] || || 305 || [wiki:MuseekPlusProtocol#a0x0305 User Joined Room] || || 306 || [wiki:MuseekPlusProtocol#a0x0306 User Left Room] || || 307 || [wiki:MuseekPlusProtocol#a0x0307 Say in Room] || || 308 || [wiki:MuseekPlusProtocol#a0x0308 Room Tickers] || || 309 || [wiki:MuseekPlusProtocol#a0x0309 Set Room Ticker] || || 310 || [wiki:MuseekPlusProtocol#a0x0310 Message Users] || || 311 || [wiki:MuseekPlusProtocol#a0x0311 Message Buddies] || || 312 || [wiki:MuseekPlusProtocol#a0x0312 Message Downloading] || || 313 || [wiki:MuseekPlusProtocol#a0x0313 Ask Public Chat] || || 314 || [wiki:MuseekPlusProtocol#a0x0314 Stop Public Chat] || || 315 || [wiki:MuseekPlusProtocol#a0x0315 Public Chat] || || 320 || [wiki:MuseekPlusProtocol#a0x0320 Private Room Toggle] || || 321 || [wiki:MuseekPlusProtocol#a0x0321 Private Room List] || || 322 || [wiki:MuseekPlusProtocol#a0x0322 Private Room Add User] || || 323 || [wiki:MuseekPlusProtocol#a0x0323 Private Room Remove User] || || 324 || [wiki:MuseekPlusProtocol#a0x0324 Room Members] || || 325 || [wiki:MuseekPlusProtocol#a0x0325 Rooms Tickers] || || 326 || [wiki:MuseekPlusProtocol#a0x0326 Private Room Alterable Members] || || 327 || [wiki:MuseekPlusProtocol#a0x0327 Private Room Alterable Operators] || || 328 || [wiki:MuseekPlusProtocol#a0x0328 Private Room Add Operator] || || 329 || [wiki:MuseekPlusProtocol#a0x0329 Private Room Remove Operator] || || 330 || [wiki:MuseekPlusProtocol#a0x0330 Private Room Dismember] || || 331 || [wiki:MuseekPlusProtocol#a0x0331 Private Room Disown] || || 401 || [wiki:MuseekPlusProtocol#a0x0401 Search] || || 402 || [wiki:MuseekPlusProtocol#a0x0402 Search Reply] || || 403 || [wiki:MuseekPlusProtocol#a0x0403 User Search] || || 405 || [wiki:MuseekPlusProtocol#a0x0405 WishList Search] || || 406 || [wiki:MuseekPlusProtocol#a0x0406 Add WishList Item] || || 407 || [wiki:MuseekPlusProtocol#a0x0407 Remove WishList Item] || || 500 || [wiki:MuseekPlusProtocol#a0x0500 Transfer State] || || 501 || [wiki:MuseekPlusProtocol#a0x0501 Transfer Update] || || 502 || [wiki:MuseekPlusProtocol#a0x0502 Transfer Remove] || || 503 || [wiki:MuseekPlusProtocol#a0x0503 Download File] || || 504 || [wiki:MuseekPlusProtocol#a0x0504 Download File To..] || || 505 || [wiki:MuseekPlusProtocol#a0x0505 Download Folder] || || 506 || [wiki:MuseekPlusProtocol#a0x0506 Abort Transfer] || || 507 || [wiki:MuseekPlusProtocol#a0x0507 Upload File] || || 508 || [wiki:MuseekPlusProtocol#a0x0508 Download Folder To..] || || 509 || [wiki:MuseekPlusProtocol#a0x0509 Upload Folder] || || 600 || [wiki:MuseekPlusProtocol#a0x0600 Get Recommendations] || || 601 || [wiki:MuseekPlusProtocol#a0x0601 Get Global Recommendations] || || 602 || [wiki:MuseekPlusProtocol#a0x0602 Get Similar Users] || || 603 || [wiki:MuseekPlusProtocol#a0x0603 Get Item's Recommendations] || || 604 || [wiki:MuseekPlusProtocol#a0x0604 Get Item's Similar Users] || || 610 || [wiki:MuseekPlusProtocol#a0x0610 Add Liked Interest] || || 611 || [wiki:MuseekPlusProtocol#a0x0611 Remove Liked Interest] || || 612 || [wiki:MuseekPlusProtocol#a0x0612 Add Hated Interest] || || 613 || [wiki:MuseekPlusProtocol#a0x0613 Remove Hated Interest] || || 700 || [wiki:MuseekPlusProtocol#a0x0700 Connect to Server]|| || 701 || [wiki:MuseekPlusProtocol#a0x0701 Disconnect from Server]|| || 703 || [wiki:MuseekPlusProtocol#a0x0703 Reload Shares]|| [[BR]] || [wiki:MuseekPlusProtocol#Genericmessageformat Generic message format ] || || [wiki:MuseekPlusProtocol#PrimitiveDatatypes Primitive Data Types] || [[BR]] || [wiki:MuseekPlusProtocol#ComplexDatatypes Complex Data Types] || [wiki:MuseekPlusProtocol#userdata userdata] [[BR]] [wiki:MuseekPlusProtocol#tranfer transfer ] [[BR]] [wiki:MuseekPlusProtocol#filentry filentry] [[BR]] [wiki:MuseekPlusProtocol#folder folder] [[BR]] [wiki:MuseekPlusProtocol#sharesdb sharesdb] [[BR]] [wiki:MuseekPlusProtocol#cipher cipher ] || === 0x0000 === '''Ping''' * Client - ''Ask the daemon to respond'' 1. '''uint''' __id__ - ''Unique identifier'' * Daemon 1. '''uint''' __id__ - ''Unique identifier (same as what was sent)'' === 0x0001 === '''Challenge''' * Client * '''Not Sent''' - ''(use 0x0002 Login to reply)'' * Daemon - ''Daemon sends this authentication challenge when connected'' 1. '''uint''' __version__ - Daemon interface protocol revision 2. '''string''' __challenge__ - The challenge. Stick interface password at the end of this and generate a hash === 0x0002 === '''Login''' * Client - ''Login attempt'' 1. '''string''' __algorithm__ - ''Digest algorithm, one of the following'' * '''SHA1''' SHA-1 algorithm * '''SHA256''' SHA256 algorithm * '''MD5''' MD5 algorithm 2. '''string''' __chresponse__ - ''Challenge response (hex string version of challenge digest)'' 3. '''uint''' __mask__ - ''Interface interest mask, bitwise OR-ed value of any or all of the following'' * '''0x01''' - ''Receive chat related messages'' * '''0x02''' - ''Receive private messages'' * '''0x04''' - ''Receive transfer messages'' * '''0x08''' - ''Receive user info message'' * '''0x10''' - ''Receive user shares messages'' * '''0x20''' - ''Receive interest and recommendation messages'' * '''0x40''' - ''Receive config messages'' * Daemon - ''Login response'' 1. '''bool''' __ok__ -Wether login was successful 2. '''string''' __message__ - ''In case of failure, what was the error:'' * ''INVHASH'' - ''Invalid digest algorithm'' * ''INVPASS'' - ''Invalid password'' 3. '''string''' __challenge__ -''New challenge, in case the interface wishes to try again'' === 0x0003 === '''Server state''' * Client * '''Not Sent''' - ''(Automatically sent on client connection)'' * Daemon - ''Network connection status'' 1. '''bool''' __connected__ - ''Wether the daemon is connected to the soulseek network'' 2. '''string''' __username__ - ''Soulseek Username'' === 0x0004 === '''Check privileges''' * Client - ''Check how many seconds of privileges you have left'' * '''Empty Message''' * Daemon 1. '''uint''' __seconds__ - ''The number of seconds of privileges you have'' === 0x0005 === '''Set status''' * Client - ''Set away status'' 1. '''uint''' __status__ - ''(0 == online, 1 == away)'' * Daemon - ''Away status set'' 1. '''uint''' __status__ - ''(0 == online, 1 == away)'' === 0x0010 === '''Status Message''' * Client * '''Not Sent''' - ''(Sent by daemon with no interaction required)'' * Daemon - ''Forward messages to the clients'' 1. '''bool''' __messagetype__ - ''( 0 == Server, 1 == Peer )'' 2. '''string''' __message__ - ''If connected, this contains the message'' === 0x0011 === '''Debug Message''' * Client * '''Not Sent''' - ''(Sent by daemon with no interaction required)'' * Daemon - ''Forward messages to the clients'' 1. '''string''' __domain__ - ''Logging Domain'' 2. '''string''' __message__ - ''If connected, this contains the message'' === 0x0012 === '''New Password''' * Client - 'Sent to change password' * '''cipher''' __password__ * Daemon - ''Received to confirm password has been changed'' * '''cipher''' __password__ === 0x0100 === '''Configuration state''' * Client * '''Not Sent''' - ''(Automatically sent on client connection)'' * Daemon - ''Contents of the configuration database'' 1. '''uint''' __ndomains__ number of domains registered 1. Iterate the range of __ndomains__ 1. '''cipher''' __domain__ domain name 1. '''uint''' __nkeys__ number of keys registered in this domain 1. Iterate the range of __nkeys__ 1. '''cipher''' __key__ name of this key 1. '''cipher''' __value__ ciphered value of this key === 0x0101 === '''Config set''' * Client - ''Make a change to the configuration database'' 1. '''cipher''' __domain__ - ''Domain to make a change in'' 1. '''cipher''' __key__ - ''Key to change'' 1. '''cipher''' __value__ - ''Value to change it to'' * Daemon - ''Config was changed'' 1. '''cipher''' __domain__ - ''The domain a change took place in'' 1. '''cipher''' __key__ - ''The key that was changed'' 1. '''cipher''' __value__ - ''The new value'' === 0x0102 === '''Config remove''' * Client - ''Remove a key from the configuration database'' 1. '''cipher''' __domain__ ''Domain to remove a key from'' 1. '''cipher''' __key__ ''Key to remove'' * Daemon 1. '''cipher''' __domain__ ''Domain that a key was removed from'' 1. '''cipher''' __key__ ''Name of the key that was removed'' === 0x0103 === '''Set user image''' * Client - ''Set the image that gets sent with the user info'' 1. '''string''' __image__ - ''The image data'' * Daemon * '''Not Sent''' === 0x0201 === '''Peer exists''' * Client - ''Check if a certain username is valid'' 1. '''string''' __username__ ''Name of the user to check'' * Daemon 1. ''string'' __username__ - ''Username that was checked'' 1. ''bool'' __exists__ - ''Wether the username is valid or not'' === 0x0202 === '''Peer status''' * Client - ''Get a user's status'' 1. '''string''' __username__ - ''Name of the user to get the status of'' * Daemon 1. '''string''' __username__ - ''Name of the user that changed status'' 1. '''uint''' __status__ - ''User's current status, one of the following:'' * 0x00 Offline * 0x01 Away * 0x02 Online === 0x0203 === '''Peer statistics''' * Client - ''Get a users's statistics'' 1. string username Name of the user to get the stats of * Daemon 1. '''string''' __username__ - ''Name of the user daemon is reporting statistics for'' 1. '''uint''' __avgspeed__ - ''User's average speed'' 1. '''uint''' __numdownloads__ - ''Number of files other users have downloaded from this user'' 1. '''uint''' __numfiles__ - ''User's file-count'' 1. '''uint''' __numdirs__ - ''User's directory-count'' 1. '''bool''' __slotsfull__ 1. '''string''' __country__ - ''User's country code'' === 0x0204 === '''User info''' * Client - ''Get a user's user-info'' 1. '''string''' __username__ - ''User to get the userinfo of'' * Daemon 1. '''string''' __username__ - ''User we got userinfo of'' 1. '''string''' __info__ - ''User's self-description'' 1. '''string''' __picture__ - ''User's picture'' 1. '''uint''' __uploads__ - ''User's total upload count'' 1. '''uint''' __queuelen__ - ''User's queue length'' 1. '''bool''' __slotfree__ - ''Wether user has a free upload slot'' === 0x0205 === '''User shares''' * Client - ''Get a user's shares'' 1. '''string''' __username__ - ''User to get the shares of'' * Daemon 1. '''string''' __username__ - ''User the daemon got the shares of'' 1. '''sharesdb''' __shares__ - ''The shares'' === 0x0206 === '''Peer address''' * Client - ''Get a user's IP address and port'' 1. '''string''' __username__ - ''User to get the IP of'' * Daemon 1. '''string''' __username__ - ''User we got the IP of'' 1. '''string''' __IP__ - ''User's IP address'' 1. '''uint''' __port__ - ''User's client port number'' === 0x0207 === '''Give privileges''' * Client - ''Donate (part) of your privileges to another user'' 1. '''string''' __username__ - ''Username of the person to donate privileges to'' 1. '''uint''' __days__ - ''How many days of privileges to donate'' * Daemon * '''Not Sent''' === 0x0300 === '''Room state''' ''This message is deprecated since museekd 0.3. Use IRoomList, IPrivRoomList, IRoomMembers and IRoomsTickers instead. * Client - ''List of rooms and joined rooms and their users'' * '''Not Sent''' * Daemon 1. '''uint''' __numrooms__ - ''Number of rooms in the room list'' 1. Iterate the range of __numrooms__ 1. '''string''' __roomname__ - ''Name of the room'' 1. '''uint''' __numusers__ - ''Number of users in this room'' 1. '''uint''' __numjoined__ - ''Number of rooms we've joined'' 1. Iterate the range of __numjoined__ 1. '''string''' __roomname__ - ''Name of the room'' 1. '''uint''' __numusers__ - ''Number of users in this room'' 1. Iterate the range of __numusers__ 1. '''string''' __username__ - ''Name of the user'' 1. '''userdata''' data ''User's statistics'' 1. '''uint''' __numtickers__ - ''Number of tickers set for this room'' 1. Iterate the range of __numtickers__ 1. '''string''' __username__ - ''Name of the ticker owner'' 1. '''string''' __message__ - ''Contents of the ticker'' === 0x0301 === '''Room list''' * Client - ''Refresh room list'' * '''Empty Message''' * Daemon 1. '''uint''' __numrooms__ - ''Number of rooms in the room list'' 1. Iterate the range of __numrooms_ 1. '''string''' __roomname__ - ''Name of the room'' 1. '''uint''' __numusers__ - ''Number of users in this room'' === 0x0302 === '''Private message''' * Client - ''Send / receive a private message'' 1. '''string''' __username__ - ''The user to send a message to'' 1. '''string''' __message__ - ''The actual message'' * Daemon 1. '''uint''' __direction__ - ''Direction (0 = incoming, 1 = outgoing)'' 1. '''uint''' __timestamp__ - ''Timestamp of when the message was received (server's timezone)'' 1. '''string''' __username__ - ''The user that sent the message'' 1. '''string''' __message__ - ''The actual message'' === 0x0303 === '''Join room''' * Client - ''Join a room'' 1. '''string''' __room__ - ''The name of the room to join'' 1. '''bool''' __private__ - ''True if the room should be private. Not present otherwise.'' * Daemon - ''Joined a room'' 1. '''string''' __room__ - ''The name of the room we joined'' 1. '''uint''' __numusers__ - ''Number of users in this room'' 1. Iterate the range of __numusers__ 1. '''string''' __username__ - ''Name of the user'' 1. '''userdata''' __data__ - ''User's statistics'' 1. '''string''' __owner__ - ''Name of the private room owner. Only if private.'' 1. '''uint''' __numops__ - ''Number of operators in this room. Only if private.'' 1. Iterate the range of __numops__ ''Only if private.'' 1. '''string''' __username__ - ''Name of the operator. Only if private.'' === 0x0304 === '''Leave room''' * Client - ''Leave / left a room'' 1. '''string''' __room__ - ''Name of the room to leave'' * Daemon 1. '''string''' __room__ - ''Name of the room we left'' === 0x0305 === '''User joined room''' * Client - ''A user joined a room'' * '''Not Sent''' * Daemon 1. '''string''' __room__ - ''Room the user joined'' 1. '''string''' __username__ - ''User that joined'' 1. '''userdata''' __data__ - ''User's statistics'' === 0x0306 === '''User left room''' * Client - ''A user left a room'' * '''Not Sent''' * Daemon 1. '''string''' __room__ - ''Room the user left'' 1. '''string''' __username__ - ''User that left'' === 0x0307 === '''Say in room''' * Client - ''Say something in a chatroom'' 1. '''string''' __room__ - ''The name of the room to say something in'' 1. '''string''' __line__ - ''What you want to say'' * Daemon 1. '''string''' __room__ - ''The name of the room someone said something in'' 1. '''string''' __user__ - ''User that said something'' 1. '''string''' __line__ - ''What the user said'' === 0x0308 === '''Room tickers''' * Client - ''List of tickers set for a room'' * '''Not Sent''' * Daemon 1. '''string''' __room__ - ''Which room the tickers are reported for'' 1. '''uint''' __numtickers ''How many tickers are set'' 1. Iterate the range of __numtickers__ 1. '''string''' __user__ - ''The user that this ticker belongs to'' 1. '''string''' __message__ - ''The actual ticker message'' === 0x0309 === '''Set room ticker''' * Client - ''Set your room ticker / a room ticker was set'' 1. '''string''' __room__ - ''The room to set the ticker in'' 1. '''string''' __message__ - ''The actual ticker message'' * Daemon 1. '''string''' __room__ - ''The room a ticker was set in'' 1. '''string''' __user__ - ''The user that set the ticker'' 1. '''string''' __message__ - ''The actual ticker message'' === 0x0310 === '''Message Users''' * Client - ''Send a message to a list of users'' 1. '''uint''' __numusers ''How many users will receive this message'' 1. Iterate the range of __numusers__ 1. '''string''' __user__ - ''The user that will receive this message'' 1. '''string''' __message__ - ''The message'' * Daemon * '''Not Sent by daemon''' === 0x0311 === '''Message Buddies''' * Client - ''Send a message to all buddies'' 1. '''string''' __message__ - ''The message'' * Daemon * '''Not Sent by daemon''' === 0x0312 === '''Message Downloading''' * Client - ''Send a message to all downloading users'' 1. '''string''' __message__ - ''The message'' * Daemon * '''Not Sent by daemon''' === 0x0313 === '''Ask Public Chat''' * Client - ''Ask the server to send us public chat'' 1. '''Empty''' * Daemon - ''Confirmation'' * '''Empty''' === 0x0314 === '''Stop Public Chat''' * Client - ''Ask the server to stop sending public chat'' 1. '''Empty''' * Daemon - ''Confirmation'' 1. '''Empty''' === 0x0315 === '''Public Chat''' * Client - ''Some public chat'' * '''Not received from clients''' * Daemon - ''Confirmation'' 1. '''string''' - ''room'' 1. '''string''' - ''user'' 1. '''string''' - ''message'' === 0x0320 === '''Private Room Toggle''' * Client - ''Can we be added as member/op'' 1. '''bool''' - ''Enabled'' * Daemon - ''Confirmation'' 1. '''bool''' - ''Enabled'' === 0x0321 === '''Private Room List''' * Client * Not received from clients * Daemon - ''List of private rooms'' 1. '''uint''' __numrooms__ - ''Number of rooms'' 1. Iterate the range of __numrooms__ 1. '''string''' __room__ - ''The room name'' 1. '''uint''' __numusers__ - ''Number of users'' 1. '''uint''' __status__ - ''Our status in the room (0=>member, 1=>operator, 2=>owner)'' === 0x0322 === '''Private Room Add User''' * Client - ''Ask to add user'' 1. '''string''' - ''Room'' 1. '''string''' - ''User'' * Daemon - ''Confirmation'' 1. '''string''' - ''Room'' 1. '''string''' - ''User'' === 0x0323 === '''Private Room Remove User''' * Client - ''Ask to remove user'' 1. '''string''' - ''Room'' 1. '''string''' - ''User'' * Daemon - ''Confirmation'' 1. '''string''' - ''Room'' 1. '''string''' - ''User'' === 0x0324 === '''Room Members''' * Client * ''Not received from clients'' * Daemon 1. '''uint''' __numrooms__ - ''Number of rooms'' 1. Iterate the range of __numrooms__ 1. '''string''' __room__ - ''The room name'' 1. '''uint''' __numusers__ - ''Number of users'' 1. Iterate the range of __numusers__ 1. '''UserData''' __userdata__ - ''User data'' 1. '''uint''' __status__ - ''User status in the room (0=>member, 1=>operator, 2=>owner)'' === 0x0325 === '''Rooms Tickers''' * Client * ''Not received from clients'' * Daemon 1. '''uint''' __numrooms__ - ''Number of rooms'' 1. Iterate the range of __numrooms__ 1. '''string''' __room__ - ''The room name'' 1. '''uint''' __numtickers__ - ''Number of tickers'' 1. Iterate the range of __numtickers__ 1. '''string''' __user__ - ''User name'' 1. '''string''' __ticker__ - ''User's message'' === 0x0326 === '''Private Room Alterable Members''' * Client * ''Not received from clients'' * Daemon 1. '''string''' - Room name 1. '''uint''' __nummembers__ - ''Number of alterable members'' 1. Iterate the range of __nummembers__ 1. '''string''' __member__ - ''The member's name'' === 0x0327 === '''Private Room Alterable Operators''' * Client * ''Not received from clients'' * Daemon 1. '''string''' - Room name 1. '''uint''' __numops__ - ''Number of alterable ops'' 1. Iterate the range of __numops__ 1. '''string''' __operator__ - ''The operator's name'' === 0x0328 === '''Private Room Add Operator''' * Client - ''Ask to add operator'' 1. '''string''' - ''Room'' 1. '''string''' - ''User'' * Daemon - ''Confirmation'' 1. '''string''' - ''Room'' 1. '''string''' - ''User'' === 0x0329 === '''Private Room Remove Operator''' * Client - ''Ask to remove operator'' 1. '''string''' - ''Room'' 1. '''string''' - ''User'' * Daemon - ''Confirmation'' 1. '''string''' - ''Room'' 1. '''string''' - ''User'' === 0x0330 === '''Private Room Dismember''' * Client - ''Dismember from a room'' 1. '''string''' - ''Room'' * Daemon * ''Not Sent'' === 0x0331 === '''Private Room Disown''' * Client - ''Disown a room'' 1. '''string''' - ''Room'' * Daemon * ''Not Sent'' === 0x0401 === '''Search''' * Client - ''Start a new search'' 1. '''uint''' __type__ - ''Search type (0 = global, 1 = buddies, 2 = room)'' 1. '''string''' __query__ - ''What you want to search for'' * Daemon 1. '''string''' __query__ - ''The query we're delivering a ticket for'' 1. '''uint''' __ticket__ - ''The search ticket'' === 0x0402 === '''Search reply''' * Client - ''Terminate a search, or results delivered by peers'' 1. '''uint''' __ticket__ - ''The ticket of the search you wish to terminate'' * Daemon 1. '''uint''' __ticket__ - ''Ticket the search results are for'' 1. '''string''' __username__ - ''User that delivered the results'' 1. '''bool''' __slotfree__ - ''Wether the user has a free upload slot'' 1. '''uint''' __avgspeed__ - ''User's average speed'' 1. '''uint''' __queuelen__ - ''User's queue length'' 1. '''folder''' __results__ - ''The actual results'' === 0x0403 === '''User Search''' * Client - ''Start a new search of only users shares'' 1. '''string''' __user__ - ''Who's shares you wish to search'' 1. '''string''' __query__ - ''What you want to search for'' * Daemon * '''Not Sent''' === 0x0405 === '''WishList Search''' * Client - ''Start a new wishlist search'' 1. '''string''' __query__ - ''What you want to search for'' * Daemon * '''Not Sent''' === 0x0406 === '''Add WishList Item''' * Client - ''Add a search term to the wishlist'' 1. '''string''' __query__ - ''What you want to search for'' * Daemon 1. '''string''' __query__ - ''What you want to search for'' 2. '''uint''' __lastSearched__ - ''Last time this term has been searched (timestamp)'' === 0x0407 === '''Remove WishList Item''' * Client - ''Remove a search term from the wishlist'' 1. '''string''' __query__ - ''What you want to stop searching for'' * Daemon 1. '''string''' __query__ - ''The removed term'' === 0x0500 === '''Transfer state''' * Client - ''Actual state of all transfers'' * '''Not Sent''' * Daemon 1. '''uint''' __numtransfers__ - ''Number of transfers'' 1. Iterate the range of __numtransfers__ 1. '''transfer''' __entry__ - ''The transfer entry'' === 0x0501 === '''Transfer update''' * Client - ''Status update of a transfer'' 1. '''string''' __username__ - ''User to update a transfer of'' 1. '''string''' __path__ - ''Path of the transfer to update (place in queue)'' * Daemon 1. '''transfer''' entry__ - ''The new state of the transfer'' === 0x0502 === '''Transfer remove''' * Client - ''Remove a transfer from the list'' 1. '''bool''' __upload__ - ''Remove upload? (if false, remove download)'' 1. '''string''' __username__ - ''User to clear a transfer from'' 1. '''string''' __path__ - ''Path of the transfer to clear'' * Daemon 1. '''bool''' __upload__ - ''Was an upload removed? (if false, download was removed)'' 1. '''string''' __username__ - ''User a transfer was removed from'' 1. '''string''' __path__ - ''Path of the transfer that was removed'' === 0x0503 === '''Download file''' * Client - ''Download a file from someone (or retry an existing transfer)'' 1. '''string''' __username__ - ''Username to download a file from'' 1. '''string''' __path__ - ''Path of the file to download'' 1. '''off_t''' __size__ - ''Size of the file to download'' * Daemon * '''Not Sent''' === 0x0504 === '''Download folder''' * Client - ''Download a folder recursively'' 1. '''string''' __username__ - ''User to download a folder from'' 1. '''string''' __folder__ - ''Path to the folder to download'' * Daemon * '''Not Sent''' === 0x0505 === '''Abort transfer''' * Client - ''Terminate a transfer'' 1. '''bool''' __upload__ - ''Abort an upload? (if false, abort download)'' 1. '''string''' __username__ - ''User to abort the transfer from'' 1. '''string''' __path__ - ''Path of the transfer to abort'' * Daemon * '''Not Sent''' === 0x0506 === '''Upload file''' * Client - ''Upload a file from your shares to someone'' 1. '''string''' __username__ - ''Username to upload a file to'' 1. '''string''' __path__ - ''Path of the file in your shares to upload'' * Daemon * '''Not Sent''' === 0x0507 === '''Download file to..''' * Client - ''Download a file to a directory'' 1. '''string''' __username__ - ''Username to download a file from'' 1. '''string''' __path__ - ''Path of the file to download'' 1. '''string''' __localpath__ - ''Path to store the file name'' 1. '''off_t''' __size__ - ''Size of the file to download'' * Daemon * '''Not Sent''' === 0x0508 === '''Download folder to..''' * Client - ''Download a folder recursively to a directory'' 1. '''string''' __username__ - ''User to download a folder from'' 1. '''string''' __folder__ - ''Path to the folder to download'' 1. '''string''' __localpath__ - ''Path to store the folder'' * Daemon * '''Not Sent''' === 0x0509 === '''Upload folder''' * Client - ''Upload a folder from your shares to someone'' 1. '''string''' __username__ - ''Username to upload a folder to'' 1. '''string''' __path__ - ''Path of the folder in your shares to upload'' * Daemon * '''Not Sent''' === 0x0600 === '''Get Recommendations''' * Client - ''Refresh Recommendations list'' * '''Empty Message''' * Daemon 1. '''uint''' __numrecommendations__ - ''Number of recommendations'' 1. Iterate the range of __numrecommendations__ 1. '''string''' __recommendation__ - ''Name of recommend'' 1. '''int''' __numrecommendation__ - ''Number of users with recommend (can be negative)'' === 0x0601 === '''Get Global Recommendations''' * Client - ''Refresh Global Recommendations list'' * '''Empty Message''' * Daemon 1. '''uint''' __numrecommendations__ - ''Number of recommendations'' 1. Iterate the range of __numrecommendations__ 1. '''string''' __recommendation__ - ''Name of recommend'' 1. '''int''' __numrecommendation__ - ''Number of users with recommend (can be negative)'' === 0x0602 === '''Get Similar Users''' * Client - ''Refresh Similar Users list'' * '''Empty Message''' * Daemon 1. '''uint''' __numusers__ - ''Number of users'' 1. Iterate the range of __numusers__ 1. '''string''' __users__ - ''Name of user'' 1. '''uint''' __numuser__ - ''User's status'' === 0x0603 === '''Get Item Recommendations''' * Client - ''Refresh Recommendations list that matches item'' 1. string item * Daemon 1. string item 1. '''uint''' __numrecommendations__ - ''Number of recommendations'' 1. Iterate the range of __numrecommendations__ 1. '''string''' __recommendation__ - ''Name of recommend'' 1. '''int''' __numrecommendation__ - ''Number or recommendations for this item (can be negative)'' === 0x0604 === '''Get Item Similar Users''' * Client - ''Refresh Similar Users that match item'' 1. string item * Daemon 1. string item 1. '''uint''' __numusers__ - ''Number of users'' 1. Iterate the range of __numusers__ 1. '''string''' __users__ - ''Name of user'' 1. '''uint''' __numuser__ - ''User's status'' === 0x0610 === '''Add Liked Interest''' Liked Interest added * Client 1. '''string''' __interest__ - ''Name of the Interest to add'' * Daemon 1. '''string''' __interest__ - ''Name of the Interest added'' === 0x0611 === '''Remove Liked Interest''' Interest Removed * Client 1. '''string''' __interest__ - ''Name of the Interest to remove'' * Daemon 1. '''string''' __interest__ - ''Name of the Interest remove'' === 0x0612 === '''Add Hated Interest''' Hated Interest added * Client 1. '''string''' __interest__ - ''Name of the Interest to add'' * Daemon 1. '''string''' __interest__ - ''Name of the Interest added'' === 0x0613 === '''Remove Hated Interest''' Hated Interest removed * Client 1. '''string''' __interest__ - ''Name of the Interest to remove'' * Daemon 1. '''string''' __interest__ - ''Name of the Interest remove'' === 0x0700 === '''Connect to Server''' * Client - ''Manually Connect to server'' * '''Empty Message''' * Daemon * '''Not Sent''' === 0x0701 === '''Disconnect from Server''' * Client - ''Manually Disconnects from server'' * '''Empty Message''' * Daemon * '''Not Sent''' === 0x0703 === '''Reload Shares''' * Client - ''Reload the Shares Databases'' * '''Empty Message''' * Daemon * '''Not Sent''' === Generic message format === 1. '''uint''' __message_len__ -- Length of the message (including the message code) (unsigned chars) 1. '''uint''' __message_code__ -- Message code 1. Message specific data === Primitive Data types === * '''bool''' -- 8bit character (0 == false, not 0 == true) * '''uint''' -- 32bit unsigned little endian ordered integer * '''off_t''' -- 64bit signed little endian ordered integer * '''string''' -- the length of the string (as an uint) + character data (all strings are UTF8) === Complex Data types === ==== userdata ==== Statistics about a user 1. '''uint''' __status__ -- user's status 1. '''uint''' __avgspeed__ -- user's average upload speed 1. '''uint''' __downloadnum__ -- number of files other users have downloaded from this user 1. '''uint''' __files__ -- number of files a user has shared 1. '''uint''' __dirs__ -- number of dirs a user has shared 1. '''bool''' __slotsfree__ -- wether or not the user has an upload slot available ==== transfer ==== Information about a transfer 1. '''bool''' __is_upload__ -- Is this an upload or a download? 1. '''string''' __user__ -- The user associated with this transfer 1. '''string''' __path__ -- The original path to the transfer 1. '''uint''' __place__ -- Place in queue or (uint)-1 if unknown (only valid for downloads) 1. '''uint''' __state__ -- The transfer's state * 00: Finished * 01: Transferring * 02: Negotiating * 03: Waiting * 04: Establishing * 05: Initiating * 06: Connecting * 07: Queued remotely * 08: Getting address * 09: Getting status * 10: Awaiting user * 11: Connection closed * 12: Cannot connect * 13: Aborted * 14: Remote error * 15: Local error * 16: Queued locally 1. '''string''' __error__ -- If the transfer's in error state, this contains the error 1. '''off_t''' __position__ -- How far has the transfer proceded 1. '''off_t''' __size__ -- Total size of this transfer 1. '''uint''' __rate__ -- How fast the transfer is proceding ==== fileentry ==== Information about a shared file 1. '''off_t''' __filesize__ -- the file's size 1. '''string''' __ext__ -- the file's extended attribute format (only 'mp3' and 'ogg' or an empty string are supported) 1. '''uint''' __numattrs__ -- number of extended attributes 1. Iterate the range of __numattrs__ * '''uint''' __attr__ -- an attribute The extended attribute format holds 3 attributes: 1. '''uint''' __bitrate__ -- the bitrate of the file 1. '''uint''' __length__ -- duration of the file in seconds 1. '''uint''' __vbr__ -- wether the mp3 has a variable bitrate or not ==== folder ==== Information about a shared folder 1. '''uint''' __numfiles__ -- how many files the folder contains 1. Iterate the range of __numfiles__ 1. '''string''' __file__ -- the filename or full path (depends on context) 1. '''fileentry''' __info__ -- the file's information ==== sharesdb ==== Information about a user's shares 1. '''uint''' __numfolders__ -- how many folders there are 1. Iterate the range of __numfolders__ 1. '''string''' __folder__ -- the folder's path 1. '''folder''' __files__ -- the files contained in this folder (filenames are relative) ==== cipher ==== AES (aka Rijndael) encrypted string Configuration strings are sent over the communication layer encrypted as they may contain sensitive information. The keyphrase of the AES cipher equals the password used to log in. This complex data type start with the length of the unencrypted string (n), followed by the encrypted string data. Crucial note: The amount of encrypted characters sent is n rounded up to the nearest 16 byte block size. For exmaple: if the original string was 6 characters long, n will be 6 but is following by 16 characters of data.