Generic message format:
uint message_len -- Length of the message (including the message code)
uint message_code -- Message code
Message specific data
Data types, primitive:
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)
Data types, complex:
userdata -- statistics about a user
uint status -- user's status
uint avgspeed -- user's average upload speed
uint downloadnum -- (unknown)
uint files -- number of files a user has shared
uint dirs -- number of dirs a user has shared
bool slotsfull -- wether or not the user has an upload slot available
transfer -- information about a transfer
bool is_upload -- Is this an upload or a download?
string user -- The user associated with this transfer
string path -- The original path to the transfer
uint place -- Place in queue or (uint)-1 if unknown (only valid for downloads)
uint state -- The transfer's state
00: Finished
01: Transferring
02: Negotiating
03: Waiting
04: Establishing
05: Initiating
06: Connecting
07: Queued
08: Getting address
09: Getting status
10: Awaiting user
11: Connection closed
12: Cannot connect
13: Aborted
14: Error
string error -- If the transfer's in error state, this contains the error
off_t position -- How far has the transfer proceded
off_t size -- Total size of this transfer
uint rate -- How fast the transfer is proceding
fileentry -- information about a shared file
off_t filesize -- the file's size
string ext -- the file's extended attribute format
(only 'mp3' or an empty string are supported)
uint numattrs -- number of extended attributes
*repeat numattrs*
uint attr -- an attribute
The 'mp3' extended attribute format holds 3 attributes:
uint bitrate -- the bitrate of the file
uint length -- duration of the file in seconds
uint vbr -- wether the mp3 has a variable bitrate or not
folder -- information about a shared folder
uint numfiles -- how many files the folder contains
*repeat numfiles*
string file -- the filename or full path (depends on context)
fileentry info -- the file's information
shares -- information about a user's shares
uint numfolders -- how many folders there are
*repeat numfolders*
string folder -- the folder's path
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.
Message types:
(Red blocks indicate general
information about the message: the message code, the message's name, and a
short description. Green blocks
specify the message-specific data sent by the interface to the Museek daemon.
Blue blocks specify the
message-specific data sent by the Museek daemon to the interface.)
0x0000 |
Ping |
Ask the daemon to respond |
uint id | Unique identifier (same as what was sent) | | |
|
0x0001 |
Challenge |
Daemon sends this authentication challenge when connected |
uint version | Daemon interface protocol revision | string challenge | The challenge. Stick interface password at the end of this and generate a hash | | |
|
0x0002 |
Login |
Request a login to the daemon |
string algorithm | Digest algorithm, one of the following: |
SHA1 | SHA-1 algorithm |
SHA256 | SHA256 algorithm |
MD5 | MD5 algorithm |
string chresponse | Challenge response (hex string version of challenge digest) |
uint mask | Interface interest mask, bitwise OR-ed value of: |
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 |
bool ok | Wether login was successful | string message | In case of failure, what was the error: | INVHASH | Invalid digest algorithm | INVPASS | Invalid password | string challenge | New challenge, in case the interface wishes to try again | | |
|
0x0003 |
Server state |
Network connection status |
bool connected | Wether the daemon is connected to the soulseek network | string username | If connected, this contains the username | | |
|
0x0004 |
Check privileges |
Check how many seconds of privileges you have left |
uint seconds | The number of seconds of privileges you have | | |
|
0x0005 |
Set status |
Set away status |
uint status | Set away status (0 == online, 1 == away) |
uint status | Away status set (0 == online, 1 == away) | | |
|
0x0010 |
Status Message |
Forward messages to the clients |
bool messagetype | Message type ( 0 == Server, 1 == Peer ) | string message | If connected, this contains the message | | |
|
0x0100 |
Configuration state |
Contents of the configuration database |
uint ndomains | number of domains registered | *repeat ndomains* | | cipher domain | domain name | uint nkeys | number of keys registered in this domain | *repeat nkeys* | | cipher key | name of this key | cipher value | ciphered value of this key | | |
|
0x0101 |
Config set |
Make a change to the configuration database |
cipher domain | Domain to make a change in |
cipher key | Key to change |
cipher value | Value to change it to |
cipher domain | The domain a change took place in | cipher key | The key that was changed | cipher value | The new value | | |
|
0x0102 |
Config remove |
Remove a key from the configuration database |
cipher domain | Domain to remove a key from |
cipher key | Key to remove |
cipher domain | Domain that a key was removed from | cipher key | Name of the key that was removed | | |
|
0x103 |
Set user image |
Set the image that gets sent with the user info |
string image | The image data |
|
0x0201 |
Peer exists |
Check if a certain username is valid |
string username | Name of the user to check |
string username | Username that was checked | bool exists | Wether the username is valid or not | | |
|
0x0202 |
Peer status |
Get a user's status |
string username | Name of the user to get the status of |
string username | Name of the user that changed status | uint status | User's current status, one of the following: | 0x00 | Offline | 0x01 | Away | 0x02 | Online | | |
|
0x0203 |
Peer statistics |
Get a users's statistics |
string username | Name of the user to get the stats of |
string username | Name of the user daemon is reporting statistics for | uint avgspeed | User's average speed | uint numdownloads | User's total download count (?) | uint numfiles | User's file-count | uint numdirs | User's directory-count | | |
|
0x0206 |
Peer address |
Get a user's IP address and port |
string username | User to get the IP of |
string username | User we got the IP of | string IP | User's IP address | uint port | User's client port number | | |
|
0x0204 |
User info |
Get a user's user-info |
string username | User to get the userinfo of |
string username | User we got userinfo of | string info | User's self-description | string picture | User's picture | uint uploads | User's total upload count | uint queuelen | User's queue length | bool slotfree | Wether user has a free upload slot | | |
|
0x0205 |
User shares |
Get a user's shares |
string username | User to get the shares of |
string username | User the daemon got the shares of | shares shares | The shares | | |
|
0x0207 |
Give privileges |
Donate (part) of your privileges to another user |
string username | Username of the person to donate privileges to |
uint days | How many days of privileges to donate |
|
0x0300 |
Room state |
List of rooms and joined rooms and their users |
uint numrooms | Number of rooms in the room list | *repeat numrooms* | | string roomname | Name of the room | uint numusers | Number of users in this room | uint numjoined | Number of rooms we've joined | *repeat numjoined* | | string roomname | Name of the room | uint numusers | Number of users in this room | *repeat numusers* | | string username | Name of the user | userdata data | User's statistics | uint numtickers | Number of tickers set for this room | *repeat numtickers* | | string username | Name of the ticker owner | string message | Contents of the ticker | | |
|
0x0301 |
Room list |
refresh room list |
uint numrooms | Number of rooms in the room list | *repeat numroos* | | string roomname | Name of the room | uint numusers | Number of users in this room | | |
|
0x0302 |
Private message |
Send / receive a private message |
string username | The user to send a message to |
string message | The actual message |
uint direction | Direction (0 = incoming, 1 = outgoing) | uint timestamp | Timestamp of when the message was received (server's timezone) | string username | The user that sent the message | string message | The actual message | | |
|
0x0303 |
Join room |
Join(ed) a room |
string room | The name of the room to join |
string room | The name of the room we joined | uint numusers | Number of users in this room | *repeat numusers* | | string username | Name of the user | userdata data | User's statistics | | |
|
0x0304 |
Leave room |
Leave / left a room |
string room | Name of the room to leave |
string room | Name of the room we left | | |
|
0x0305 |
User joined room |
A user joined a room |
string room | Room the user joined | string username | User that joined | userdata data | User's statistics | | |
|
0x0306 |
User left room |
A user left a room |
string room | Room the user left | string username | User that left | | |
|
0x0307 |
Say in room |
Say something in a chatroom |
string room | The name of the room to say someting in |
string line | What you want to say |
string room | The name of the room someone said something in | string user | User that said something | string line | What the user said | | |
|
0x0308 |
Room tickers |
List of tickers set for a room |
string room | Which room the tickers are reported for | uint numtickers | How many tickers are set | *repeat numtickers* | | string user | The user that this ticker belongs to | string message | The actual ticker message | | |
|
0x0309 |
Set room ticker |
Set your room ticker / a room ticker was set |
string room | The room to set the ticker in |
string message | The actual ticker message |
string room | The room a ticker was set in | string user | The user that set the ticker | string message | The actual ticker message | | |
|
0x0401 |
Search |
Start a new search |
uint type | Search type (0 = global, 1 = buddies, 2 = room) |
string query | What you want to search for |
string query | The query we're delivering a ticket for | uint ticket | The search ticket | | |
|
0x0402 |
Search reply |
Terminate a search, or results delivered by peers |
uint ticket | The ticket of the search you wish to terminate |
uint ticket | Ticket the search results are for | string username | User that delivered the results | bool slotfree | Wether the user has a free upload slot | uint avgspeed | User's average speed | uint queuelen | User's queue length | folder results | The actual results | | |
|
0x0403 |
User Search |
Start a new search of only users shares |
string user | Who's shares you wish to search |
string query | What you want to search for |
|
0x0405 |
WishList Search |
Start a new wishlist search |
string query | What you want to search for |
|
0x0500 |
Transfer state |
Actual state of all transfers |
uint numtransfers | Number of transfers | *repeat numtransfers* | | transfer entry | The transfer entry | | |
|
0x0501 |
Transfer update |
Status update of a transfer |
string username | User to update a transfer of |
string path | Path of the transfer to update (place in queue) |
transfer entry | The new state of the transfer | | |
|
0x0502 |
Transfer remove |
Remove a transfer from the list |
bool upload | Remove upload? (if false, remove download) |
string username | User to clear a transfer from |
string path | Path of the transfer to clear |
bool upload | Was an upload removed? (if false, download was removed) | string username | User a transfer was removed from | string path | Path of the transfer that was removed | | |
|
0x0503 |
Download file |
Download a file from someone (or retry an existing transfer) |
string username | Username to download a file from |
string path | Path of the file to download |
string localpath | Path to store the file name |
off_t size | File's size (can be 0) |
|
0x0507 |
Download file to |
Download a file to a directory |
string username | Username to download a file from |
string path | Path of the file to download |
string localpath | Path to store the file name |
off_t size | File's size (can be 0) |
|
0x0504 |
Download folder |
Download a folder recursively |
string username | User to download a folder from |
string folder | Path to the folder to download |
|
0x0505 |
Abort transfer |
Terminate a transfer |
bool upload | Abort an upload? (if false, abort download) |
string username | User to abort the transfer from |
string path | Path of the transfer to abort |
|
0x0506 |
Upload file |
Upload a file from your shares to someone |
string username | Username to upload a file to |
string path | Path of the file in your shares to upload |
|
0x0600 |
Get Recommendations |
Refresh Recommendations list |
uint numrecommendations | Number of recommendations | *repeat numrecommendations* | | string recommendation | Name of recommend | uint numrecommendation | Number of users with recommend | | |
|
0x0601 |
Get Global Recommendations |
Refresh Global Recommendations list |
uint numrecommendations | Number of recommendations | *repeat numrecommendations* | | string recommendation | Name of recommend | uint numrecommendation | Number of users with recommend | | |
|
0x0602 |
Get Similar Users |
Refresh Similar Users list |
uint numusers | Number of users | *repeat numusers* | | string users | Name of user | uint numuser | Number of user | | |
|
0x0603 |
Get Item Recommendations |
Refresh Recommendations list that matches item |
string | item | uint numrecommendations | Number of recommendations | *repeat numrecommendations* | | string recommendation | Name of recommend | uint numrecommendation | 0 | | |
|
0x0604 |
Get Item Similar Users |
Refresh Similar Users that match item |
string | item | uint numusers | Number of users | *repeat numusers* | | string users | Name of user | uint numuser | Number of user | | |
|
0x0610 |
Add Like Interest |
Liked Interest added |
string interest | Name of the Interest to add |
string interest | Name of the Interest added | | |
|
0x0611 |
Remove Interest |
Interest Removed |
string interest | Name of the Interest to remove |
string interest | Name of the Interest remove | | |
|
0x0612 |
Add Hated Interest |
Hated Interest added |
string interest | Name of the Interest to add |
string interest | Name of the Interest added | | |
|
0x0613 |
Remove Hated Interest |
Hated Interest removed |
string interest | Name of the Interest to remove |
string interest | Name of the Interest remove | | |
|
0x0700 |
Connect to Server |
Manually Connect to server |
|
0x0701 |
Disconnect from Server |
Manually Disconnects from server |
|
0x0703 |
Reload Shares |
Reload the Shares Database |
|