The Soulseek Protocol
Original, most up-to-date version on the Museek-Plus TracServer Messages
Server Messages Peer Messages Distributed Messages Museek Data Types
Send | Send to Server |
Receive | Receive from Server |
These messages are used by clients to interface with the server. Internal Server messages are spooky and not understood, since the OSS crowd doesn't have access to it's source code. If you want a Soulseek server, check out Soulfind. Soulfind is obviously not the exact same the official Soulseek server, but it handles the protocol well enough (and can be modified).
In museekd, these messages are sent and received in Museek/ServerConnection.cc and defined in Museek/ServerMessages.hh
The Message format
Message Length | Code | Message Contents |
Message Index
Server Code 1
Login
Museekd: SLogin
Send your username, password, and client version.
- Send
- string username
- string password
- uint32 version number 182 is used for Museek+
- Receive
- data buffer Windows Soulseek uses this hash to determine if it's connected to the official server
- uchar success
- string greet
Server Code 2
Set Listen Port
Museekd: SSetListenPort
The port you listen for connections on (2234 by default)
- Send
- uint32 port
- Receive
- No Message
Server Code 3
Get Peer Address
Museekd: SGetPeerAddress
- Send
- string username
- Receive
- string username
- ip ip
- uint32 port
Server Code 5
Add User
Museekd: SAddUser
Watch this user's status
- Send
- string username
- Receive
- string username
- char exists converted to Boolean
Server Code 7
Get Status
Museekd: SGetStatus
- Send
- string username
- Receive
- string username
- uint32 status 0 == Offline, 1 == Away; 2 == Online
- bool privileged 0 == not, 1 == yes (New addition)
Server Code 13
Say in Chat Room
Museekd: SSayChatroom
- Send
- string room
- string message
- Receive
- string room
- string username
- string message
Server Code 14
Join a Room
Museekd: SJoinRoom
- Send
- string room
- Receive
- string room
- uint32 number of users in room
- Iterate the number of users museekd uses a vector of strings
- string user
- uint32 number of userdata (unused in museekd)
- Iterate the number of users museekd uses a vector of userdata
- uint32 status
- data userdata
- uint32 number of userdata (unused in museekd)
- Iterate the userdata vector of userdata (and add unpacked data to User Data)
- uint32 avgspeed
- uint32 downloadnum
- uint32 ??? (Unused)
- uint32 files
- uint32 dirs
- Iterate thru userdata
- uint32 slotsfull
ServerMessages?.hh then Iterates thru userdata and users (For passing message to daemon)
- Add data to RoomData users[string username ] = data
Server Code 15
Leave Room
Museekd: SLeaveRoom
- Send (leave room)
- string room
- Receive (left room)
- string room
Server Code 16
A User Joined a Room
Museekd: SUserJoinedRoom
- Send
- No Message
- Receive
- string username
- string room
- uint32 status
- uint32 avgspeed
- uint32 downloadnum
- uint32 ??? (Unused)
- uint32 files
- uint32 dirs
- uint32 slotsfull
Server Code 17
A User Left a Room
Museekd: SUserLeftRoom
A user (not you) left a room you are in.
- Send
- No Message
- Receive
- string username
- string room
Server Code 18
Connect To Peer
Museekd: SConnectToPeer
A message you send to the server to notify a client that you want to connect to it, after direct connection has failed.
See also: Code 1001 CannotConnect
- Send
- uint32 token
- string username
- string type P or F
- Receive
- string username
- string type P or F
- ip ip
- uint32 port
- uint32 token
Server Code 22
Private Messages
Museekd: SPrivateMessage
- Send
- string username
- string message
- Receive
- uint32 ID
- uint32 timestamp
- string username
- string message
Server Code 23
Acknowledge Private Message
Museekd: SAckPrivateMessage
Acknowledge that you received a Private message. If we do not send it, the server will keep sending the chat phrase to us.
(Museekd also Reset timestamps to account for server-time bugginess)
- Send
- uint32 message ID
- Receive
- uint32 message ID
Server Code 26
File Search
Museekd: SFileSearch
The ticket is a random number generated by the client and used to track the search results.
- Send
- uint32 ticket
- string search query
- Receive search request from another user
- string username
- uint32 ticket
- string search query
Server Code 28
Set Online Status
Museekd: SSetStatus
Status is a way to define whether you're available or busy. 0 = Online and 1 = Away
- Send
- uint32 status
- Receive
- No Message
Server Code 32
Ping
Museekd: SPing
- Send
- Empty Message
- Receive
- Empty Message
Server Code 34
Send Speed
Note: This Message is defunct and no longer used by Soulseek, message 121 is used instead
Museekd: SSendSpeed
- Send average transfer speed
- string username
- uint32 speed
- Receive
- No Message
Server Code 35
Shared Folders & Files
Museekd: SSharedFoldersFiles
- Send
- uint32 dirs
- uint32 files
- Receive
- No Message
Server Code 36
Get User Stats
Museekd: SGetUserStats
- Send
- string username
- Receive
- string username
- uint32 avgspeed
- uint32 downloadnum
- uint32 ??? (Unused)
- uint32 files
- uint32 dirs
Server Code 40
Queued Downloads
Server Code 41
Kicked from Server
Museekd: SKicked
You were disconnected (probably by another user with your name connecting to the Server) so don't try to reconnect automatically.
- Send
- Empty Message
- Receive
- Empty Message
Server Code 42
User Search
Museekd: SUserSearch
Search a specific user's shares
- Send
- string username
- uint32 ticket
- string search query
- Receive
- string username
- uint32 ticket
- string search query
Server Code 51
Add Liked Interest
Museekd: SInterestAdd
- Send
- string item
- Receive
- string item
Server Code 52
Remove Liked Interest
Museekd: SInterestRemove
- Send
- string item
- Receive
- string item
Server Code 54
Get Recommendations
Museekd: SGetRecommendations
- Send
- Empty Message
- Receive
- uint32 number of total recommendations
- Iterate for number of total recommendations
- string recommendation
- uint32 number of recommendations this recommendation has
Server Code 56
Get Global Recommendations
Museekd: SGetGlobalRecommendations
- Send
- Empty Message
- Receive
- uint32 number of total recommendations
- Iterate for number of total recommendations
- string recommendation
- uint32 number of recommendations this recommendation has
Server Code 64
Room List
Museekd: SRoomList
List of rooms and the number of users in them. Soulseek has a room size requirement of about 50 users when first connecting. Refreshing the list will download all rooms.
- Send
- Empty Message
- Receive
- uint32 number of rooms
- Iterate for number of rooms
- string room
- uint32 number of rooms (unused in museekd)
- Iterate for number of rooms
- uint32 number of users in room
Server Code 65
Exact File Search
Museekd: SExactFileSearch
- Send
- No Message
- Receive
- string username
- uint32 ticket
- string filename
- string path
- off_t filesize
- uint32 checkum
Server Code 66
Global / Admin Message
Museekd: SGlobalMessage
Admins send this message
- Send
- No Message
- Receive
- string message
Server Code 69
Privileged Users
Museekd: SPrivilegedUsers
- Send
- No Message
- Receive
- uint32 number of users
- Iterate number of users
- string user
Server Code 71
Have No Parents
Museekd: SHaveNoParents
- Send
- uchar have_parents (is a boolean internal to museekd)
- Receive
- No Message
Server Code 83 - 83
- Send
- No Message
- Receive
- uint32 number
Server Code 84 - 84
- Send
- No Message
- Receive
- uint32 number
Server Code 86
Parent Inactivity Timeout
Museekd: SParentInactivityTimeout
- Send
- No Message
- Receive
- uint32 number
Server Code 87
Search Inactivity Timeout
Museekd: SSearchInactivityTimeout
- Send
- No Message
- Receive
- uint32 number
Server Code 88
Minimum Parents In Cache
Museekd: SMinParentsInCache
- Send
- No Message
- Receive
- uint32 number
Server Code 90
Distributed Alive Interval
Museekd: SDistribAliveInterval
- Send
- No Message
- Receive
- uint32 number
Server Code 91
Add Privileged User
Museekd: SAddPrivileged
Add a new privileged user to your list of privileged users
- Send
- No Message
- Receive
- string user
Server Code 92
Check Privileges
Museekd: SCheckPrivileges
- Send
- Empty Message
- Receive
- uint32 time_left
Server Code 102
Net Info
Museekd: SNetInfo
- Send
- Empty Message
- Receive list of search parents
- uint32 number of parents
- Iterate for number of rooms
- string user
- IP IP address
- uint32 number of users in room
Server Code 103
Wishlist Search
Museekd: SWishlistSearch
- Send
- uint32 ticket
- string search query
- Receive
- No Message
Server Code 104
Wishlist Interval
Museekd: SWishlistInterval
- Send
- No Message
- Receive
- uint32 interval
Server Code 110
Get Similar Users
Museekd: SGetSimilarUsers
- Send
- Empty Message
- Receive
- uint32 number of users
- Iterate for number of user
- string user
- uint32 status
Server Code 111
Get Item Recommendations
Museekd: SGetItemRecommendations
- Send
- string item
- Receive
- uint32 number of recommendations
- Iterate for number of recommendations
- string recommendation
- uint32 number of recommendations for this recommendation
Server Code 112
Get Item Similar Users
Museekd: SGetItemSimilarUsers
- Send
- string item
- Receive
- uint32 number of users
- Iterate for number of user
- string user
- uint32 0
Server Code 113
Room Tickers
Museekd: SRoomTickers
- Send
- No Message
- Receive
- string room
- uint32 number of users
- Iterate for number of user
- string user
- string tickers
Server Code 114
Room Ticker Add
Museekd: SRoomTickerAdd
- Send
- No Message
- Receive
- string room
- string user
- string ticker
Server Code 115
Room Ticker Remove
Museekd: SRoomTickerRemove
- Send
- No Message
- Receive
- string room
- string user
Server Code 116
Set Room Ticker
Museekd: SSetRoomTicker
- Send
- string room
- string ticker
- Receive
- No Message
Server Code 117
Add Hated Interest
Museekd: SInterestHatedAdd
- Send
- string item
- Receive
- string item
Server Code 118
Remove Hated Interest
Museekd: SInterestHatedRemove
- Send
- string item
- Receive
- string item
Server Code 120
Room Search
Museekd: SRoomSearch
- Send
- string room
- string ticket
- string search query
- Receive
- string user
- string ticket
- string search query
Server Code 121
Send Upload Speed
Museekd: SSetUploadSpeed
- Send
- uint32 speed (in bits-per-second)
- Receive
- No Message
Server Code 122
A user's Soulseek Privileges
Museekd: SUserPrivileges
- Send
- string user
- Receive
- string user
- char privileged (boolean internal to museekd)
Server Code 123
Give Soulseek Privileges to user
Museekd: SGivePrivileges
- Send
- string user
- uint32 days
- Receive
- No Message
Server Code 1001
Cannot Connect
Museekd: SCannotConnect
See also: Code 18 ConnectToPeer
- Send to the Server if we cannot connect to a peer.
- uint32 token
- string user
- Receive this response means we are both firewalled or otherwise unable to connect to each other.
- uint32 token
- string user
Peer Messages
Server Messages Peer Messages Distributed Messages Museek Data Types
Send | Send to Peer |
Receive | Receive from Peer |
In museekd, these messages are sent and received in Museek/PeerConnection.cc and defined in Museek/PeerMessages.hh
The Message format
Message Length | Code | Message Contents |
Message Index
Code | Message |
4 | Shares Request |
5 | Shares Reply |
8 | Search Request |
9 | Search Reply |
15 | Info Request |
16 | Info Reply |
36 | Folder Contents Request |
37 | Folder Contents Reply |
40 | Transfer Request |
41 | Upload Reply |
41 | Download Reply |
41 | Transfer Reply |
42 | Upload Placehold |
43 | Queue Download |
44 | Upload Queue Notification |
46 | Upload Failed |
50 | Queue Failed |
51 | Place In Queue Request |
52 | Upload Queue Notification |
Peer Code 4
Shares Request
Museekd: PSharesRequest
- Send
- Empty Message
- Receive
- Empty Message
Peer Code 5
Shares Reply
Museekd: PSharesReply
- Send shares database
- Iterate thru shares database
- data
- Iterate thru shares database
- Receive shares database
- decompress
- uint32 number of directories
- Iterate number of directories
- string directory
- uint32 number of files
- Iterate number of files
- char ??? (unused by museekd)
- string filename
- off_t size File size
- string ext Extentsion
- uint32 number of attributes
- Iterate number of attributes
- uint32 place in attributes (unused by museekd)
- uint32 attribute
Peer Code 8
Search Request
Museekd: PSearchRequest
- Send
- uint32 ticket
- string query
- Receive
- uint32 ticket
- string query
Peer Code 9
Search Reply
Museekd: PSearchReply
- Send
- string user
- uint32 ticket
- uint32 results size number of results
- Iterate for number of results
- uchar 1
- string filename
- uint32 size
- string ext
- uint32 attribute size
- Iterate number of attributes
- uint32 place in attributes
- uint32 attribute
- Receive
- string user
- uint32 ticket
- uint32 results size number of results
- Iterate for number of results
museekd pop buffer
- string filename
- off_t size
- string ext
- uint32 number of attributes
- Iterate number of attributes
- uint32 place in attributes
- uint32 attribute
Peer Code 15
Info Request
Museekd: PInfoRequest
- Send
- Empty Message
- Receive
- Empty Message
Peer Code 16
Info Reply
Museekd: PInfoReply
- Send description, picture, totalupl, queuesize, slotfree
- string description
- Check contents of picture
- If picture is not empty
- uchar has_picture 1
- vector of uchar picture
- If picture is empty
- uchar has_picture 0
- If picture is not empty
- uint totalupl
- uint queuesize
- uint32 slotsfree
- Receive
- string description
- char has_picture
- Check contents of has_picture
- If has_picture is not empty
- vector of uchar picture
- If has_picture is not empty
- uint32 totalupl
- uint32 queuesize
- uint32 slotsfree
Peer Code 36
Folder Contents Request
Museekd: PFolderContentsRequest
- Send
- uint32 number of files in directory
- Iterate number of files in directory
- string file
- Receive
- uint32 number of files in directory
- Iterate number of files in directory
- string file
Peer Code 37
Folder Contents Reply
Museekd: PFolderContentsReply
- Send
- uint32 number of folders
- Iterate for number of folders
- string dir
- uint32 number of files
- Iterate number of files
- char true
- string file
- off_t size
- string ext Extension
- uint32 number of attributes
- uint32 attribute number
- uint32 attribute
- Receive
- uint32 number of folders
- Iterate for number of folders
- string dir
- uint32 number of files
- Iterate number of files
- char ??? (unused by museekd)
- string file
- off_t size
- string ext Extension
- uint32 number of attributes
- uint32 attribute number
- uint32 attribute
Peer Code 40
Transfer Request
Museekd: PTransferRequest
- Send
- uint32 direction
- uint32 ticket
- string filename
- Check contents of direction
- off_t filesize if direction == 1
- Receive
- uint32 direction
- uint32 ticket
- string filename
- Check contents of direction
- off_t filesize if direction == 1
Peer Code 41 a
Upload Reply
Museekd: PUploadReply
- Send
- string ticket
- uchar allowed
- Check contents of allowed
- off_t filesize if allowed == 1
- string reason if allowed == 0
- Receive
- No Message
Peer Code 41 b
Download Reply
Museekd: PDownloadReply
- Send
- string ticket
- uchar allowed
- Check contents of allowed
- string reason if allowed == 0
- Receive
- No Message
Peer Code 41 c
Transfer Reply
Museekd: PTransferReply
- Send
- No Message
- Receive
- string ticket
- char allowed == 1
- Check contents of allowed
- off_t filesize if allowed == 1
- string reason if allowed == 0
Peer Code 42
Upload Placehold
Museekd: PUploadPlacehold
- Send
- string filename
- Receive
- string filename
Peer Code 43
Queue Download
Museekd: PQueueDownload
- Send
- string filename
- Receive
- string filename
Peer Code 44
Place In Queue Reply
Museekd: PPlaceInQueueReply
- Send
- string filename
- string place
- Receive
- string filename
- string place
Peer Code 46
Upload Failed
Museekd: PUploadFailed
- Send
- string filename
- Receive
- string filename
Peer Code 50
Queue Failed
Museekd: PQueueFailed
- Send
- string filename
- string reason
- Receive
- string filename
- string reason
Peer Code 51
Place In Queue Request
Museekd: PPlaceInQueueRequest
- Send
- string filename
- Receive
- string filename
Peer Code 52
Upload Queue Notification
Museekd: PUploadQueueNotification
- Send
- Empty Message
- Receive
- Empty Message
Distributed Messages
Server Messages Peer Messages Distributed Messages Museek Data Types
Send | Send to Node |
Receive | Receive from Node |
In museekd, these messages are sent and received in Museek/DistribConnection.cc and defined in Museek/DistribMessages.hh
The Message format
Message Length | Code | Message Contents |
Message Index
Code | Message |
0 | Ping |
3 | Search Request |
Distributed Code 0
Ping
Museekd: DPing
- Send
- Empty Message
- Receive
- Empty Message
Distributed Code 3
Search Request
Museekd: DSearchRequest
- Send
- uint32 unknown
- string user
- uint32 ticket
- string query
- Receive
- uint32 unknown
- string user
- uint32 ticket
- string query
Museek Data Types
Server Messages Peer Messages Distributed Messages Museek Data Types
StringMap
- std::map<std::string, std::string>
StringList
- std::vector<std::string>
WStringList
- std::vector<std::wstring> WStringList
WTickers
- std::map<std::string, std::wstring>
Recommendations, SimilarUsers, RoomList
- std::map<std::string, uint32>
NetInfo
- std::map<std::string, std::pair<std::string, uint32> >
UserData
- uint32 status Online Status
- uint32 avgspeed Average Speed
- uint32 downloadnum Number of downloaded files
- uint32 files Files shared
- uint32 dirs Directories shared
- bool slotsfull Slots full
RoomData
- std::map<std::string, UserData>
Folder
- std::map<std::string, FileEntry>
Shares
- std::map<std::string, Folder>
WFolder
- std::map<std::wstring, FileEntry>
Folders
- std::map<std::string, Shares>
WShares
- std::map<std::wstring, WFolder>
WFolders
- std::map<std::wstring, WShares>