The Soulseek Protocol
Return to Developing Museek Plus or to Developing Nicotine Plus
Packing
String
| Length of String | String |
| 4 Byte | String |
Integer (unsigned)
| Number |
| 4 Byte |
Large Integer (64bits for file sizes)
| Number |
| 8 Byte |
Bool
| Character |
| 1 Byte |
Server 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 0.1.13, these messages are sent and received in Museek/ServerConnection.cc and defined in Museek/ServerMessages.hh
In Nicotine, these messages are matched to their message number in slskproto.py in the SlskProtoThread? function, defined in slskmessages.py and callbacks for the messages are set in pynicotine.py.
The Server Message format
| Message Length | Code | Message Contents |
| 4 Bytes | 4 Bytes | ... |
Message Index
Server Code 1
Login
Function Names
Museekd: SLogin
Nicotine: Login
Description
Send your username, password, and client version.
Sending Login Example
| Description | Message Length | Message Code | Username Length | Username | Password Length | Password |
| Human | 72 | 1 | 8 | username | 8 | password |
| Hex | 48 00 00 00 | 01 00 00 00 | 08 00 00 00 | 75 73 65 72 6e 61 6d 65 | 08 00 00 00 | 70 61 73 73 77 6f 72 64 |
Message, continued
| Description | Version | Length | Hash | Number |
| Human | 181 | 32 | d51c9a7e9353746a6020f9602d452929 | 1 |
| Hex | b5 00 00 00 | 20 00 00 00 | 64 35 31 63 39 61 37 65 39 33 35 33 37 34 36 61 36 30 32 30 66 39 36 30 32 64 34 35 32 39 32 39 | 01 00 00 00 |
Message as a Hex Stream 48 00 00 00 01 00 00 00 08 00 00 00 75 73 65 72 6e 61 6d 65 08 00 00 00 70 61 73 73 77 6f 72 64 b5 00 00 00 20 00 00 00 64 35 31 63 39 61 37 65 39 33 35 33 37 34 36 61 36 30 32 30 66 39 36 30 32 64 34 35 32 39 32 39 01 00 00 00
Data Order
- Send Login
- string username
- string password A non-empty string is required
- uint32 version number 182 for Museek+ 181 for Nicotine+
- string MD5 hex digest of concatenated username & password
- uint32 1 ??? No idea what exactly this is.
- string Unknown string In 157 and up
- Receive Login Success
- uchar success 1
- string greet A MOTD string
- uint32 Your IP Address
- string MD5 hex digest of the password string Windows Soulseek uses this hash to determine if it's connected to the official server
- Receive Login Failure
- uchar failure 0
- string reason Almost always: Bad Password; sometimes it's a banned message or another error.
Server Code 2
Set Listen Port
Function Names
Museekd: SSetListenPort
Nicotine: SetWaitPort?
Description
The port you listen for connections on (2234 by default)
Data Order
- Send
- uint32 port
- Receive
- No Message
Server Code 3
Get Peer Address
Function Names
Museekd: SGetPeerAddress
Nicotine: GetPeerAddress?
Description
A server for a user's IP Address and port
Data Order
- Send
- string username
- Receive
- string username
- ip ip
- int port
Server Code 5
Add User
Function Names
Museekd: SAddUser
Nicotine: AddUser?
Description
Watch this user's status
Data Order
- Send
- string username
- Receive
- string username
- char exists converted to Boolean
- If exists is 1/True (may not be implemented)
- int status 0 == Offline, 1 == Away; 2 == Online
- int avgspeed
- off_t downloadnum
- int files
- int dirs
- string Country Code (may not be implemented)
Server Code 6
Unknown
Function Names
Museekd: Not implemented
Nicotine: Not implemented
Description
Something to do with user status. Usually sent just after SAddUser
Data Order
- Send
- string username
- Receive
- No Message
Server Code 7
Get Status
Function Names
Museekd: SGetStatus
Nicotine: GetUserStatus?
Description
Data Order
- Send
- string username
- Receive
- string username
- int status 0 == Offline, 1 == Away; 2 == Online
Server Code 13
Say in Chat Room
Function Names
Museekd: SSayChatroom
Nicotine: SayChatroom?
Description
Data Order
- Send
- string room
- string message
- Receive
- string room
- string username
- string message
Server Code 14
Join a Room
Function Names
Museekd: SJoinRoom
Nicotine: JoinRoom?
Description
Data Order
- Send
- string room
- Receive
- string room
- int number of users in room
- Iterate the number of users museekd uses a vector of strings
- string user
- int number of userdata
- Iterate the number of users museekd uses a vector of userdata
- int status
- int number of userdata
- Iterate the userdata vector of userdata (and add unpacked data to User Data)
- int avgspeed
- off_t downloadnum
- int files
- int dirs
- int number of slotsfree
- Iterate thru number of slotsfree
- int slotsfree
- int number of usercountries (may not be implemented)
- Iterate thru number of usercountries
- string countrycode Uppercase country code
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
Function Names
Museekd: SLeaveRoom
Nicotine: LeaveRoom?
Description
Data Order
- Send (leave room)
- string room
- Receive (left room)
- string room
Server Code 16
A User Joined a Room
Function Names
Museekd: SUserJoinedRoom
Nicotine: UserJoinedRoom?
Description
Data Order
- Send
- No Message
- Receive
- string room
- string username
- int status
- int avgspeed
- off_t downloadnum
- int files
- int dirs
- int slotsfree
- string countrycode_ Uppercase country code
Server Code 17
A User Left a Room
Function Names
Museekd: SUserLeftRoom
Nicotine: UserLeftRoom?
Description
A user (not you) left a room you are in.
Data Order
- Send
- No Message
- Receive
- string room
- string username
Server Code 18
Connect To Peer
Function Names
Museekd: SConnectToPeer
Nicotine: ConnectToPeer?
Description
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: Peer Connection Message Order
Data Order
- Send
- uint32 token
- string username
- string type Connection Type (P, F or D)
- Receive
- string username
- string type Connection Type (P, F or D)
- ip ip
- int port
- uint32 token Use this token for Pierce Firewall
Server Code 22
Private Messages
Function Names
Museekd: SPrivateMessage
Nicotine: MessageUser?
Description
Data Order
- Send
- string username
- string message
- Receive
- int ID
- int timestamp
- string username
- string message
Server Code 23
Acknowledge Private Message
Function Names
Museekd: SAckPrivateMessage
Nicotine: MessageAcked?
Description
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)
Data Order
- Send
- int message ID
- Receive
- No Message
Server Code 26
File Search
Museekd: SFileSearch
Nicotine: FileSearch?
Description
The ticket is a random number generated by the client and used to track the search results.
Data Order
- Send
- int ticket
- string search query
- Receive search request from another user
- string username
- int ticket
- string search query
Server Code 28
Set Online Status
Function Names
Museekd: SSetStatus
Nicotine: SetStatus?
Description
Status is a way to define whether you're available or busy. 1 = Away and 2 = Online
Data Order
- Send
- int status
- Receive
- No Message
Server Code 32
Ping
Function Names
Museekd: SPing
Nicotine: ServerPing?
Description
Test if server responds
Data Order
- Send
- Empty Message
- Receive
- Empty Message
Server Code 34
Send Speed
Function Names
Museekd: SSendSpeed
Nicotine: SendSpeed?
Description
DEPRECIATED
Data Order
- Send average transfer speed
- string username
- int speed
- Receive
- No Message
Server Code 35
Shared Folders & Files
Function Names
Museekd: SSharedFoldersFiles
Nicotine: SharedFoldersFiles?
Description
Data Order
- Send
- int dirs
- int files
- Receive
- No Message
Server Code 36
Get User Stats
Museekd: SGetUserStats
Nicotine: GetUserStats?
Data Order
- Send
- string username
- Receive
- string username
- int avgspeed
- off_t downloadnum
- int files
- int dirs
Server Code 40
Queued Downloads
Function Names
Museekd: Not implemented Nicotine: QueuedDownloads?
Description
DEPRECIATED
Data Order
- Send
- No Message
- Receive
- string username
- bool slotsfree Can immediately download
Server Code 41
Kicked from Server
Function Names
Museekd: SKicked
Nicotine: Relogged
Description
You were disconnected (probably by another user with your name connecting to the Server) so don't try to reconnect automatically.
Data Order
- Send
- Empty Message
- Receive
- Empty Message
Server Code 42
User Search
Function Names
Museekd: SUserSearch
Nicotine: UserSearch?
Description
Search a specific user's shares
Data Order
- Send
- string username
- int ticket
- string search query
- Receive
- No Message
Server Code 51
Add Liked Interest
Function Names
Museekd: SInterestAdd
Nicotine: AddThingILike
Description
Data Order
- Send
- string item
- Receive
- No Message
Server Code 52
Remove Liked Interest
Function Names
Museekd: SInterestRemove
Nicotine: RemoveThingILike
Description
Data Order
- Send
- string item
- Receive
- No Message
Server Code 54
Get Recommendations
Function Names
Museekd: SGetRecommendations
Nicotine: Recommendations
Description
List of recommendations and a number for each
Data Order
- Send
- Empty Message
- Receive
- int number of total recommendations
- Iterate for number of total recommendations
- string recommendation
- int number of recommendations this recommendation has
- int number of total unrecommendations
- Iterate for number of total unrecommendations
- string unrecommendation
- int number of unrecommendations this unrecommendation has (negative)
Server Code 56
Get Global Recommendations
Function Names
Museekd: SGetGlobalRecommendations
Nicotine: GlobalRecommendations?
Description
List of recommendations and a number for each
Data Order
- Send
- Empty Message
- Receive
- int number of total recommendations
- Iterate for number of total recommendations
- string recommendation
- int number of recommendations this recommendation has
- int number of total unrecommendations
- Iterate for number of total unrecommendations
- string unrecommendation
- int number of unrecommendations this unrecommendation has (negative)
Server Code 57
Get User Interests
Function Names
Museekd:
Nicotine: UserInterests?
Description
Get a User's Liked and Hated Interests
Data Order
- Send
- string username
- Receive
- string username
- int number of liked interests
- Iterate for number of liked interests
- string interest
- int number of hated interests
- Iterate for number of hated interests
- string interest
Server Code 64
Room List
Function Names
Museekd: SRoomList
Nicotine: RoomList?
Description
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.
Data Order
- Send
- Empty Message
- Receive
- int number of rooms
- Iterate for number of rooms
- string room
- int number of rooms (unused in museekd)
- Iterate for number of rooms
- int number of users in room
Server Code 65
Exact File Search
Function Names
Museekd: SExactFileSearch
Nicotine: ExactFileSearch?
Description
SEEMS BROKEN (no results even with official client)
Data Order
- Send
- No Message
- Receive
- string username
- uint32 ticket
- string filename
- string path
- off_t filesize
- uint32 checkum
Server Code 66
Global / Admin Message
Function Names
Museekd: SGlobalMessage
Nicotine: AdminMessage?
Description
Admins send this message to all users
Data Order
- Send
- No Message
- Receive
- string message
Server Code 69
Privileged Users
Function Names
Museekd: SPrivilegedUsers
Nicotine: PrivilegedUsers?
Description
List of privileged users
Data Order
- Send
- No Message
- Receive
- int number of users
- Iterate number of users
- string user
Server Code 71
Have No Parents
Function Names
Museekd: SHaveNoParents
Nicotine: HaveNoParent?
Description
Data Order
- Send
- bool have_parents (is a boolean internal to museekd)
- Receive
- No Message
Server Code 73
Parent's IP
Function Names
Museekd: SParentIP
Description
Send our parent's IP to the server
Data Order
- Send
- ip ip
- Receive
- No Message
Server Code 83
Description
Unknown Purpose
Data Order
- Send
- No Message
- Receive
- int number
Server Code 84
Description
Unknown Purpose. Number was 0x0a before 157c. Now 0x64 since 157 NS 13c.
Data Order
- Send
- No Message
- Receive
- int number
Server Code 86
Parent Inactivity Timeout
Description
DEPRECIATED
Function Names
Museekd: SParentInactivityTimeout
Nicotine: ParentInactivityTimeout?
Description
Data Order
- Send
- No Message
- Receive
- int number
Server Code 87
Search Inactivity Timeout
Description
DEPRECIATED
Function Names
Museekd: SSearchInactivityTimeout
Nicotine: SearchInactivityTimeout?
Description
Data Order
- Send
- No Message
- Receive
- int number
Server Code 88
Minimum Parents In Cache
Description
DEPRECIATED
Function Names
Museekd: SMinParentsInCache
Nicotine: MinParentsInCache?
Description
Data Order
- Send
- No Message
- Receive
- int number
Server Code 90
Distributed Alive Interval
Description
DEPRECIATED
Function Names
Museekd: SDistribAliveInterval
Nicotine: DistribAliveInterval?
Description
Data Order
- Send
- No Message
- Receive
- int number
Server Code 91
Add Privileged User
Function Names
Museekd: SAddPrivileged
Nicotine: AddToPrivileged?
Description
Add a new privileged user to your list of global privileged users
Data Order
- Send
- No Message
- Receive
- string user
Server Code 92
Check Privileges
Function Names
Museekd: SCheckPrivileges
Nicotine: CheckPrivileges?
Description
Data Order
- Send
- Empty Message
- Receive
- int time_left
Server Code 93
Search Request
Description
The server sends us search requests from other users
Function Names
Museekd: SSearchRequest
Data Order
- Send
- No Message
- Receive
- uint8 distributed code (DSearchRequest)
- int unknown
- string username
- int token
- string query
Server Code 100
Accept Children
Description
Tell the server if we want to have some children
Function Names
Museekd: SAcceptChildren
Data Order
- Send
- bool accept
- Receive
- No Message
Server Code 102
Net Info
Description
Function Names
Museekd: SNetInfo
Nicotine: NetInfo?
Data Order
- Send
- Empty Message
- Receive list of search parents
- int number of parents
- Iterate for number of parents
- string user
- IP IP address
- int port
Server Code 103
Wishlist Search
Function Names
Museekd: SWishlistSearch
Nicotine: WishlistSearch?
Description
Data Order
- Send
- int ticket
- string search query
- Receive
- No Message
Server Code 104
Wishlist Interval
Function Names
Museekd: SWishlistInterval
Nicotine: WishlistInterval?
Description
Data Order
- Send
- No Message
- Receive
- int interval
Server Code 110
Get Similar Users
Function Names
Museekd: SGetSimilarUsers
Nicotine: SimilarUsers?
Description
Data Order
- Send
- Empty Message
- Receive
- int number of users
- Iterate for number of user
- string user
- int status
Server Code 111
Get Item Recommendations
Function Names
Museekd: SGetItemRecommendations
Nicotine: ItemRecommendations?
Description
Data Order
- Send
- string item
- Receive
- string item
- int number of recommendations
- Iterate for number of recommendations
- string recommendation
- int number of recommendations for this recommendation (can be negative)
Server Code 112
Get Item Similar Users
Function Names
Museekd: SGetItemSimilarUsers
Nicotine: ItemSimilarUsers?
Description
Data Order
- Send
- string item
- Receive
- string item
- int number of users
- Iterate for number of user
- string user
- int 0
Server Code 113
Room Tickers
Function Names
Museekd: SRoomTickers
Nicotine: RoomTickerState?
Description
Data Order
- Send
- No Message
- Receive
- string room
- int number of users
- Iterate for number of user
- string user
- string tickers
Server Code 114
Room Ticker Add
Function Names
Museekd: SRoomTickerAdd
Nicotine: RoomTickerAdd?
Description
Data Order
- Send
- No Message
- Receive
- string room
- string user
- string ticker
Server Code 115
Room Ticker Remove
Function Names
Museekd: SRoomTickerRemove
Nicotine: RoomTickerRemove?
Description
Data Order
- Send
- No Message
- Receive
- string room
- string user
Server Code 116
Set Room Ticker
Function Names
Museekd: SSetRoomTicker
Nicotine: RoomTickerSet?
Description
Data Order
- Send
- string room
- string ticker
- Receive
- No Message
Server Code 117
Add Hated Interest
Function Names
Museekd: SInterestHatedAdd
Nicotine: AddThingIHate
Description
Data Order
- Send
- string item
- Receive
- No Message
Server Code 118
Remove Hated Interest
Function Names
Museekd: SInterestHatedRemove
Nicotine: RemoveThingIHate
Description
Data Order
- Send
- string item
- Receive
- No Message
Server Code 120
Room Search
Function Names
Museekd: SRoomSearch
Nicotine: RoomSearch?
Description
Data Order
- Send
- string room
- string ticket
- string search query
- Receive
- No Message
Server Code 121
Send Upload Speed
Function Names
Museekd: SSendUploadSpeed
Nicotine: SendUploadSpeed?
Description
Data Order
- Send average upload transfer speed
- int speed
- Receive
- No Message
Server Code 122
A user's Soulseek Privileges
Function Names
Museekd: SUserPrivileges
Nicotine: Not implemented
Description
Data Order
- Send
- string user
- Receive
- string user
- char privileged (boolean internal to museekd)
Server Code 123
Give Soulseek Privileges to user
Function Names
Museekd: SGivePrivileges
Nicotine: GivePrivileges?
Description
Data Order
- Send
- string user
- int days
- Receive
- No Message
Server Code 124
Server sends us a Notification about our privileges
Function Names
Nicotine: NotifyPrivileges?
Description
Data Order
- Send
- int token
- string user
- Receive
- No Message
Server Code 125
Acknowledge Privilege Notification
Function Names
Nicotine: AckNotifyPrivileges?
Description
Data Order
- Send
- No Message
- Receive
- int token
Server Code 126
Branch Level
Description
Tell the server what is our position in our branch (xth generation)
Function Names
Museekd: SBranchLevel
Data Order
- Send
- int branch_level
- Receive
- No Message
Server Code 127
Branch Root
Description
Tell the server the username of the root of the branch we're in
Function Names
Museekd: SBranchRoot
Data Order
- Send
- string branch_root
- Receive
- No Message
Server Code 129
Child depth
Description
Tell the server the maximum number of generation of children we have.
Function Names
Museekd: SChildDepth
Data Order
- Send
- int child_depth
- Receive
- No Message
Server Code 133
Private Room Users
Description
We get this when we've created a private room
Function Names
Museekd: Unimplemented Nicotine: PrivateRoomUsers?
Data Order
- Send
- No Message
- Receive
- string room
- int number of users
- Iterate for number of users
- string users
Server Code 134
Private Room Add User
Description
We get / receive this when we add a user to a private room.
Function Names
Museekd: Unimplemented Nicotine: PrivateRoomAddUser?
Data Order
- Send
- string room
- string user
- Receive
- string room
- string user
Server Code 135
Private Room Remove User
Description
We get / send this when we remove a user from a private room
Function Names
Museekd: Unimplemented Nicotine: PrivateRoomRemoveUser?
Data Order
- Send
- string room
- string user
- Receive
- string room
- string user
Server Code 136
Private Room Drop Membership
Description
We do this to remove our own membership of a private room.
Function Names
Museekd: Unimplemented Nicotine: PrivateRoomDismember?
Data Order
- Send
- string room
- Receive
- string room
Server Code 137
Private Room Drop Ownership
Description
We do this to stop owning a private room.
Function Names
Museekd: Unimplemented Nicotine: PrivateRoomDisown?
Data Order
- Send
- string room
- Receive
- string room
Server Code 138
Private Room Unknown
Description
Undocumented
Function Names
Museekd: Unimplemented Nicotine: PrivateRoomSomething?
Data Order
- Send
- string room
- Receive
- string room
Server Code 139
Private Room Added
Description
We are sent this when we are added to a private room.
Function Names
Museekd: Unimplemented Nicotine: PrivateRoomAdded?
Data Order
- Send
- string room
- Receive
- string room
Server Code 140
Private Room Removed
Description
We are sent this when we are removed from a private room.
Function Names
Museekd: Unimplemented Nicotine: PrivateRoomRemoved?
Data Order
- Send
- string room
- Receive
- string room
Server Code 141
Private Room Toggle
Description
We send this when we want to enable or disable invitations to private rooms
Function Names
Museekd: Unimplemented Nicotine: PrivateRoomToggle?
Data Order
- Send
- bool enable
- Receive
- bool enable
Server Code 143
Private Room Add Operator
Description
We send this to add private room operator abilities to a user
Function Names
Museekd: Unimplemented Nicotine: PrivateRoomAddOperator?
Data Order
- Send
- string room
- Receive
- string room
Server Code 144
Private Room Remove Operator
Description
We send this to remove privateroom operator abilities from a user
Function Names
Museekd: Unimplemented Nicotine: PrivateRoomRemoveOperator?
Data Order
- Send
- string room
- Receive
- string room
Server Code 145
Private Room Operator Added
Description
We receive this when given privateroom operator abilities
Function Names
Museekd: Unimplemented Nicotine: PrivateRoomOperatorAdded?
Data Order
- Send
- string room
- Receive
- string room
Server Code 146
Private Room Operator Removed
Description
We receive this when privateroom operator abilities are removed
Function Names
Museekd: Unimplemented Nicotine: PrivateRoomOperatorRemoved?
Data Order
- Send
- string room
- Receive
- string room
Server Code 148
Private Room Owned
Description
Undocumented
Function Names
Museekd: Unimplemented Nicotine: PrivateRoomOwned?
Data Order
- Send
- string room
- Receive
- string room
Server Code 1001
Cannot Connect
Function Names
Museekd: SCannotConnect
Nicotine: CantConnectToPeer?
Description
See also: Peer Connection Message Order
Data Order
- Send to the Server if we cannot connect to a peer.
- int token
- string user
- Receive this response means we are both firewalled or otherwise unable to connect to each other.
- int token
- string user
Peer Messages
Server Messages Peer Messages Distributed Messages Museek Data Types
| Send | Send to Peer |
| Receive | Receive from Peer |
In museekd 0.1.13, these messages are sent and received in Museek/PeerConnection.cc and defined in Museek/PeerMessages.hh
The Peer Init Message format
| Message Length | Code | Message Contents |
| 4 Bytes | 1 Byte | ... |
Peer Init Message Index
| Code | Message |
| 0 | Pierce Firewall |
| 1 | Peer Init |
Peer Connection Message Order
- User A sends a Peer Init to User B (Fails: socket cannot connect)
- User A sends ConnectToPeer to the Server with a unique token
- The Server sends a ConnectToPeer response to User B with the same token
- User B sends a Pierce Firewall to User A with the same token (if this fails connections are doomed)
- User B sends a Cannot Connect to the Server
- The Server sends a Cannot Connect response to User A
Peer Code 0
Pierce Firewall
Function Names
Description
See also: Peer Connection Message Order
Data Order
- Send
- uint32 token Unique Number
- Receive
- uint32 token Unique Number
Peer Code 1
Peer Init
Function Names
Description
See also: Peer Connection Message Order
Data Order
- Send
- string user Local Username
- string type Connection Type (P, F or D)
- uint32 token Unique Number
- Receive
- string user Remote Username
- string type Connection Type (P, F or D)
- uint32 token Unique Number
The Message format
| Message Length | Code | Message Contents |
| 4 Bytes | 4 Bytes | ... |
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
Function Names
Museekd: PSharesRequest
Nicotine: GetShareFileList?
Description
Data Order
- Send
- Empty Message
- Receive
- Empty Message
Peer Code 5
Shares Reply
Function Names
Museekd: PSharesReply
Nicotine: SharedFileList?
Description
Data Order
- Send shares database
- Iterate thru shares database
- data
- Iterate thru shares database
- Receive shares database
- decompress
- int number of directories
- Iterate number of directories
- string directory
- int number of files
- Iterate number of files
- char ??? (unused)
- string filename
- off_t size File size
- string ext Extentsion
- int number of attributes
- Iterate number of attributes
- int place in attributes (unused by museekd)
- int attribute
Peer Code 8
Search Request
Museekd: PSearchRequest
Nicotine: FileSearchRequest?
Description
Data Order
- Send
- int ticket
- string query
- Receive
- int ticket
- string query
Peer Code 9
Search Reply
Function Names
Museekd: PSearchReply
Nicotine: FileSearchResult?
Description
Data Order
- Send
- string user
- int ticket
- int results size number of results
- Iterate for number of results
- uchar 1
- string filename
- int size
- string ext
- int attribute size
- Iterate number of attributes
- int place in attributes
- int attribute
- Receive
- string user
- int ticket
- int results size number of results
- Iterate for number of results
museekd pop buffer
- string filename
- off_t size
- string ext
- int number of attributes
- Iterate number of attributes
- int place in attributes
- int attribute
Peer Code 15
Info Request
Function Names
Museekd: PInfoRequest
Nicotine: UserInfoRequest?
Description
Data Order
- Send
- Empty Message
- Receive
- Empty Message
Peer Code 16
Info Reply
Function Names
Museekd: PInfoReply
Nicotine: UserInfoReply?
Description
Data Order
- Send description, picture, totalupl, queuesize, slotfree
- string description
- Check contents of picture
- If picture is not empty
- bool has_picture 1
- string picture
- If picture is empty
- bool has_picture 0
- If picture is not empty
- uint totalupl
- uint queuesize
- bool slotsfree Can immediately upload
- Receive
- string description
- char has_picture
- Check contents of has_picture
- If has_picture is not empty
- string picture
- If has_picture is not empty
- int totalupl
- int queuesize
- bool slotsfree Can immediately download
Peer Code 36
Folder Contents Request
Function Names
Museekd: PFolderContentsRequest
Nicotine: FolderContentsRequest?
Description
Data Order
- Send
- int number of files in directory
- Iterate number of files in directory
- string file
- Receive
- int number of files in directory
- Iterate number of files in directory
- string file
Peer Code 37
Folder Contents Reply
Function Names
Museekd: PFolderContentsReply
Nicotine: FolderContentsResponse?
Description
Data Order
- Send
- int number of folders
- Iterate for number of folders
- string dir
- int number of files
- Iterate number of files
- char true
- string file
- off_t size
- string ext Extension
- int number of attributes
- int attribute number
- int attribute
- Receive
- int number of folders
- Iterate for number of folders
- string dir
- int number of files
- Iterate number of files
- char ??? (unused)
- string file
- off_t size
- string ext Extension
- int number of attributes
- int attribute number
- int attribute
Peer Code 40
Transfer Request
Function Names
Museekd: PTransferRequest
Nicotine: TransferRequest?
Description
Data Order
- Send
- int direction
- int ticket
- string filename
- Check contents of direction
- off_t filesize if direction == 1
- Receive
- int direction
- int ticket
- string filename
- Check contents of direction
- off_t filesize if direction == 1
Peer Code 41 a
Upload Reply
Function Names
Museekd: PUploadReply
Nicotine: TransferResponse?
Description
Data Order
- 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
Function Names
Museekd: PDownloadReply
Nicotine: TransferResponse?
Description
Data Order
- Send
- string ticket
- uchar allowed
- Check contents of allowed
- string reason if allowed == 0
- Receive
- No Message
Peer Code 41 c
Transfer Reply
Function Names
Museekd: PTransferReply
Nicotine: TransferResponse?
Description
Data Order
- 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
Function Names
Museekd: PUploadPlacehold
Nicotine: PlaceholdUpload?
Description
DEPRECIATED
Data Order
- Send
- string filename
- Receive
- string filename
Peer Code 43
Queue Upload or Download
Function Names
Museekd: PQueueDownload
Nicotine: QueueUpload?
Description
Data Order
- Send
- string filename
- Receive
- string filename
Peer Code 44
Place In Queue Reply
Museekd: PPlaceInQueueReply
[
Nicotine: PlaceInQueue?
Description
Data Order
- Send
- string filename
- string place
- Receive
- string filename
- string place
Peer Code 46
Upload Failed
Function Names
Museekd: PUploadFailed
Nicotine: UploadFailed?
Description
Data Order
- Send
- string filename
- Receive
- string filename
Peer Code 50
Queue Failed
Function Names
Museekd: PQueueFailed
Nicotine: QueueFailed?
Description
Data Order
- Send
- string filename
- string reason
- Receive
- string filename
- string reason
Peer Code 51
Place In Queue Request
Function Names
Museekd: PPlaceInQueueRequest
Nicotine: PlaceInQueueRequest?
Description
Data Order
- Send
- string filename
- Receive
- string filename
Peer Code 52
Upload Queue Notification
Function Names
Museekd: PUploadQueueNotification
Nicotine: Not implemented
Description
Data Order
- 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 0.1.13, these messages are sent and received in Museek/DistribConnection.cc and defined in Museek/DistribMessages.hh
The Message format
| Message Length | Code | Message Contents |
| 4 Bytes | 1 Byte | ... |
Message Index
| Code | Message |
| 0 | Ping |
| 3 | Search Request |
| 4 | Branch Level |
| 5 | Branch Root |
| 7 | Child Depth |
Distributed Code 0
Ping
Description
Send it every 60 sec.
Function Names
Museekd: DPing
Nicotine: DistribAlive?
Data Order
- Send
- Empty Message
- Receive
- uint32 unknown
Distributed Code 3
Search Request
Description
Transmit the search requests to our children. (Search requests are sent to us by the server using SSearchRequest if we're a branch root, or by our parent using DSearchRequest)
Function Names
Museekd: DSearchRequest
Nicotine: DistribSearch?
Data Order
- Send
- uint32 unknown
- string user
- uint32 ticket
- string query
- Receive
- uint32 unknown
- string user
- uint32 ticket
- string query
Distributed Code 4
Branch Level
Description
See SBranchLevel
Function Names
Museekd: DBranchLevel
Nicotine: DistribUnknown?
Data Order
- Send
- uint32 branch_level
- Receive
- uint32 branch_level
Distributed Code 5
Branch Root
Description
See SBranchRoot
Function Names
Museekd: DBranchRoot
Data Order
- Send
- string branch_root
- Receive
- string branch_root
Distributed Code 7
Branch Level
Description
See SChildDepth
Function Names
Museekd: DChildDepth
Data Order
- Send
- uint32 child_depth
- Receive
- uint32 child_depth
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 slotsfree Slots free
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>
off_t
- Packed as a 64bit Integer
