Nicotine+

Logo

A graphical client for Soulseek

View the Project on GitHub Nicotine-Plus/nicotine-plus

Soulseek Protocol Documentation

Last updated on 11 October 2020

Sections

Packing

String

Length of String String
4 Byte String

Integer

Number
4 Byte

Large Integer

Number
8 Byte

Bool

Character
1 Byte

Constants

Connection Types

Type Connection
P Peer To Peer
F File Transfer
D Distributed Network

Status Codes

Code Status
-1 Unknown
0 Offline
1 Away
2 Online

Transfer Direction

Code Type
0 Download
1 Upload

Server Messages

Send Receive
Send to Server 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 its 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. Since museekd 0.2, they are defined in museekd/servermessages.h.

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

Code Message
1 Login
2 Set Listen Port
3 Get Peer Address
5 Add User
6 Remove User
7 Get Status
13 Say in Chat Room
14 Join Room
15 Leave Room
16 User Joined Room
17 User Left Room
18 Connect To Peer
22 Private Messages
23 Acknowledge Private Message
26 File Search
28 Set Online Status
32 Ping
34 Send Speed
35 Shared Folders & Files
36 Get User Stats
40 Queued Downloads
41 Kicked from Server
42 User Search
51 Interest Add
52 Interest Remove
54 Get Recommendations
56 Get Global Recommendations
57 Get User Interests
60 Place In Line Response
62 Room Added
63 Room Removed
64 Room List
65 Exact File Search
66 Global/Admin Message
67 Global User List
69 Privileged Users
71 Have No Parents
73 Parent’s IP
83 Parent Min Speed
84 Parent Speed Ratio
86 Parent Inactivity Timeout
87 Search Inactivity Timeout
88 Minimum Parents In Cache
90 Distributed Alive Interval
91 Add Privileged User
92 Check Privileges
93 Search Request
100 Accept Children
102 Possible Parents
103 Wishlist Search
104 Wishlist Interval
110 Get Similar Users
111 Get Item Recommendations
112 Get Item Similar Users
113 Room Tickers
114 Room Ticker Add
115 Room Ticker Remove
116 Set Room Ticker
117 Hated Interest Add
118 Hated Interest Remove
120 Room Search
121 Send Upload Speed
122 User Privileges
123 Give Privileges
124 Notify Privileges
125 Acknowledge Notify Privileges
126 Branch Level
127 Branch Root
129 Child Depth
133 Private Room Users
134 Private Room Add User
135 Private Room Remove User
136 Private Room Drop Membership
137 Private Room Drop Ownership
138 Private Room Unknown
139 Private Room Added
140 Private Room Removed
141 Private Room Toggle
142 New Password
143 Private Room Add Operator
144 Private Room Remove Operator
145 Private Room Operator Added
146 Private Room Operator Removed
148 Private Room Owned
149 Message Users
150 Ask Public Chat
151 Stop Public Chat
152 Public Chat Message
153 Related Searches
1001 Cannot Connect

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 Minor Version
Human 157 32 d51c9a7e9353746a6020f9602d452929 19
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 13 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

Server Code 2

Set Listen Port

Function Names

Museekd: SSetListenPort
Nicotine: SetWaitPort

Description

We send this to the server to indicate the port number that we listen on (2234 by default).

Data Order

Server Code 3

Get Peer Address

Function Names

Museekd: SGetPeerAddress
Nicotine: GetPeerAddress

Description

We send this to the server to ask for a peer’s address (IP address and port), given the peer’s username.

Data Order

Server Code 5

Add User

Function Names

Museekd: SAddUser
Nicotine: AddUser

Description

Used to be kept updated about a user’s stats. When a user’s stats have changed, the server sends a GetUserStats response message with the new user stats.

Data Order

Server Code 6

Remove User

Function Names

Museekd: Unimplemented
Nicotine: RemoveUser

Description

Used when we no longer want to be kept updated about a user’s stats.

Data Order

Server Code 7

Get Status

Function Names

Museekd: SGetStatus
Nicotine: GetUserStatus

Description

The server tells us if a user has gone away or has returned.

Data Order

Server Code 13

Say in Chat Room

Function Names

Museekd: SSayChatroom
Nicotine: SayChatroom

Description

Either we want to say something in the chatroom, or someone else did.

Data Order

Server Code 14

Join a Room

Function Names

Museekd: SJoinRoom
Nicotine: JoinRoom

Description

Server sends us this message when we join a room. Contains users list with data on everyone.

Data Order

Server Code 15

Leave Room

Function Names

Museekd: SLeaveRoom
Nicotine: LeaveRoom

Description

We send this to the server when we want to leave a room.

Data Order

Server Code 16

A User Joined a Room

Function Names

Museekd: SUserJoinedRoom
Nicotine: UserJoinedRoom

Description

The server tells us someone has just joined a room we’re in.

Data Order

Server Code 17

A User Left a Room

Function Names

Museekd: SUserLeftRoom
Nicotine: UserLeftRoom

Description

The server tells us someone has just left a room we’re in.

Data Order

Server Code 18

Connect To Peer

Function Names

Museekd: SConnectToPeer
Nicotine: ConnectToPeer

Description

Either we ask server to tell someone else we want to establish a connection with them, or server tells us someone wants to connect with us. Used when the side that wants a connection can’t establish it, and tries to go the other way around (direct connection has failed).

See also: Peer Connection Message Order

Data Order

Server Code 22

Private Messages

Function Names

Museekd: SPrivateMessage
Nicotine: MessageUser

Description

Chat phrase sent to someone or received by us in private.

Data Order

Server Code 23

Acknowledge Private Message

Function Names

Museekd: SAckPrivateMessage
Nicotine: MessageAcked

Description

We send this to the server to confirm that we received a private message. If we don’t send it, the server will keep sending the chat phrase to us.

Museekd also resets timestamps to account for server-time bugginess.

Data Order

Server Code 26

File Search

Function Names

Museekd: SFileSearch
Nicotine: FileSearch

Description

We send this to the server when we search for something. Alternatively, the server sends this message to tell us that someone is searching for something.

The ticket/search id is a random number generated by the client and is used to track the search results.

Data Order

Server Code 28

Set Online Status

Function Names

Museekd: SSetStatus
Nicotine: SetStatus

Description

We send our new status to the server. Status is a way to define whether you’re available or busy.

-1 = Unknown
0 = Offline
1 = Away
2 = Online

Data Order

Server Code 32

Ping

Function Names

Museekd: SPing
Nicotine: ServerPing

Description

DEPRECATED

We test if the server responds.

Data Order

Server Code 34

Send Speed

Function Names

Museekd: SSendSpeed
Nicotine: SendSpeed

Description

DEPRECATED

We used to send this after a finished download to let the server update the speed statistics for a user.

Data Order

Server Code 35

Shared Folders & Files

Function Names

Museekd: SSharedFoldersFiles
Nicotine: SharedFoldersFiles

Description

We send this to server to indicate the number of folder and files that we share.

Data Order

Server Code 36

Get User Stats

Function Names

Museekd: SGetUserStats
Nicotine: GetUserStats

Description

The server sends this to indicate a change in a user’s statistics, if we’ve requested to watch the user in AddUser previously. A user’s stats can also be requested by sending a GetUserStats message to the server, but AddUser should be used instead.

Data Order

Server Code 40

Queued Downloads

Function Names

Museekd: Unimplemented
Nicotine: QueuedDownloads

Description

DEPRECATED

The server sends this to indicate if someone has download slots available or not.

Data Order

Server Code 41

Kicked from Server

Function Names

Museekd: SKicked
Nicotine: Relogged

Description

The server sends this if someone else logged in under our nickname, and then disconnects us.

Data Order

Server Code 42

User Search

Function Names

Museekd: SUserSearch
Nicotine: UserSearch

Description

We send this to the server when we search a specific user’s shares. The ticket/search id is a random number generated by the client and is used to track the search results.

Data Order

Server Code 51

Add Liked Interest

Function Names

Museekd: SInterestAdd
Nicotine: AddThingILike

Description

We send this to the server when we add an item to our likes list.

Data Order

Server Code 52

Remove Liked Interest

Function Names

Museekd: SInterestRemove
Nicotine: RemoveThingILike

Description

We send this to the server when we remove an item from our likes list.

Data Order

Server Code 54

Get Recommendations

Function Names

Museekd: SGetRecommendations
Nicotine: Recommendations

Description

The server sends us a list of personal recommendations and a number for each.

Data Order

Server Code 56

Get Global Recommendations

Function Names

Museekd: SGetGlobalRecommendations
Nicotine: GlobalRecommendations

Description

The server sends us a list of global recommendations and a number for each.

Data Order

Server Code 57

Get User Interests

Function Names

Museekd: SUserInterests
Nicotine: UserInterests

Description

We ask the server for a user’s liked and hated interests. The server responds with a list of interests.

Data Order

Server Code 60

Place In Line Response

Description

DEPRECATED

The server tells us a new room has been added.

Function Names

Museekd: Unimplemented
Nicotine: PlaceInLineResponse

Data Order

Server Code 62

Room Added

Description

DEPRECATED

The server tells us a new room has been added.

Function Names

Museekd: Unimplemented
Nicotine: RoomAdded

Data Order

Server Code 63

Room Removed

Description

DEPRECATED

The server tells us a room has been removed.

Function Names

Museekd: Unimplemented
Nicotine: RoomRemoved

Data Order

Server Code 64

Room List

Function Names

Museekd: SRoomList
Nicotine: RoomList

Description

The server tells us a 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

  1. int number of owned private rooms
  2. Iterate for number of owned private rooms
    1. string owned private room
  3. int number of owned private rooms
  4. Iterate for number of owned private rooms
    1. int number of users in owned private room
  1. int number of private rooms (except owned)
  2. Iterate for number of private rooms (except owned)
    1. string private room
  3. int number of private rooms (except owned)
  4. Iterate for number of private rooms (except owned)
    1. int number of users in private rooms (except owned)
  1. int number of operated private rooms
  2. Iterate for number of operated private rooms
    1. string operated private room

Server Code 65

Exact File Search

Function Names

Museekd: SExactFileSearch
Nicotine: ExactFileSearch

Description

DEPRECATED (no results even with official client)

Someone is searching for a file with an exact name.

Data Order

Server Code 66

Global / Admin Message

Function Names

Museekd: SGlobalMessage
Nicotine: AdminMessage

Description

A global message from the server admin has arrived.

Data Order

Server Code 67

Global User List

Function Names

Museekd: Unimplemented
Nicotine: GlobalUserList

Description

DEPRECATED

We send this to get a global list of all users online.

Data Order

Server Code 69

Privileged Users

Function Names

Museekd: SPrivilegedUsers
Nicotine: PrivilegedUsers

Description

The server sends us a list of privileged users, a.k.a. users who have donated.

Data Order

Server Code 71

Have No Parents

Function Names

Museekd: SHaveNoParents
Nicotine: HaveNoParent

Description

We inform the server if we have a distributed parent or not. If not, the server eventually sends us a PossibleParents message with a list of 10 possible parents to connect to.

Data Order

Server Code 73

Parent’s IP

Function Names

Museekd: SParentIP
Nicotine: SearchParent

Description

We send the IP address of our parent to the server.

Data Order

Server Code 83

Parent Min Speed

Description

Unknown purpose

Function Names

Museekd: SParentMinSpeed
Nicotine: ParentMinSpeed (unused)

Data Order

Server Code 84

Parent Speed Ratio

Description

Unknown purpose

Function Names

Museekd: SParentSpeedRatio
Nicotine: ParentSpeedRatio (unused)

Data Order

Server Code 86

Parent Inactivity Timeout

Description

DEPRECATED

Function Names

Museekd: SParentInactivityTimeout
Nicotine: ParentInactivityTimeout

Data Order

Server Code 87

Search Inactivity Timeout

Description

DEPRECATED

Function Names

Museekd: SSearchInactivityTimeout
Nicotine: SearchInactivityTimeout

Data Order

Server Code 88

Minimum Parents In Cache

Description

DEPRECATED

Function Names

Museekd: SMinParentsInCache
Nicotine: MinParentsInCache

Description

Data Order

Server Code 90

Distributed Alive Interval

Description

DEPRECATED

Function Names

Museekd: SDistribAliveInterval
Nicotine: DistribAliveInterval

Description

Data Order

Server Code 91

Add Privileged User

Function Names

Museekd: SAddPrivileged
Nicotine: AddToPrivileged

Description

The server sends us the username of a new privileged user, which we add to our list of global privileged users.

Data Order

Server Code 92

Check Privileges

Function Names

Museekd: SCheckPrivileges
Nicotine: CheckPrivileges

Description

We ask the server how much time we have left of our privileges. The server responds with the remaining time, in seconds.

Data Order

Server Code 93

Search Request

Description

The server sends us search requests from other users.

Function Names

Museekd: SSearchRequest
Nicotine: SearchRequest

Data Order

Server Code 100

Accept Children

Description

We tell the server if we want to accept child nodes.

Function Names

Museekd: SAcceptChildren
Nicotine: AcceptChildren (not yet used)

Data Order

Server Code 102

Possible Parents

Description

The server send us a list of 10 possible distributed parents to connect to. Messages of this type are sent to us at regular intervals, until we tell the server we don’t need more possible parents with a HaveNoParent message.

Function Names

Museekd: SNetInfo
Nicotine: PossibleParents

Data Order

Server Code 103

Wishlist Search

Function Names

Museekd: SWishlistSearch
Nicotine: WishlistSearch

Description

Data Order

Server Code 104

Wishlist Interval

Function Names

Museekd: SWishlistInterval
Nicotine: WishlistInterval

Description

Data Order

Server Code 110

Get Similar Users

Function Names

Museekd: SGetSimilarUsers
Nicotine: SimilarUsers

Description

The server sends us a list of similar users related to our interests.

Data Order

Server Code 111

Get Item Recommendations

Function Names

Museekd: SGetItemRecommendations
Nicotine: ItemRecommendations

Description

The server sends us a list of recommendations related to a specific item, which is usually present in the like/dislike list or an existing recommendation list.

Data Order

Server Code 112

Get Item Similar Users

Function Names

Museekd: SGetItemSimilarUsers
Nicotine: ItemSimilarUsers

Description

The server sends us a list of similar users related to a specific item, which is usually present in the like/dislike list or recommendation list.

Data Order

Server Code 113

Room Tickers

Function Names

Museekd: SRoomTickers
Nicotine: RoomTickerState

Description

The server returns a list of tickers in a chat room.

Tickers are customizable, user-specific messages that appear in a banner at the top of a chat room.

Data Order

Server Code 114

Room Ticker Add

Function Names

Museekd: SRoomTickerAdd
Nicotine: RoomTickerAdd

Description

The server sends us a new ticker that was added to a chat room.

Tickers are customizable, user-specific messages that appear in a banner at the top of a chat room.

Data Order

Server Code 115

Room Ticker Remove

Function Names

Museekd: SRoomTickerRemove
Nicotine: RoomTickerRemove

Description

The server informs us that a ticker was removed from a chat room.

Tickers are customizable, user-specific messages that appear in a banner at the top of a chat room.

Data Order

Server Code 116

Set Room Ticker

Function Names

Museekd: SSetRoomTicker
Nicotine: RoomTickerSet

Description

We send this to the server when we change our own ticker in a chat room.

Tickers are customizable, user-specific messages that appear in a banner at the top of a chat room.

Data Order

Server Code 117

Add Hated Interest

Function Names

Museekd: SInterestHatedAdd
Nicotine: AddThingIHate

Description

We send this to the server when we add an item to our hate list.

Data Order

Server Code 118

Remove Hated Interest

Function Names

Museekd: SInterestHatedRemove
Nicotine: RemoveThingIHate

Description

We send this to the server when we remove an item from our hate list.

Data Order

Server Code 120

Room Search

Function Names

Museekd: SRoomSearch
Nicotine: RoomSearch

Description

Data Order

Server Code 121

Send Upload Speed

Function Names

Museekd: SSendUploadSpeed
Nicotine: SendUploadSpeed

Description

We send this after a finished upload to let the server update the speed statistics for ourselves.

Data Order

Server Code 122

User Privileges

Function Names

Museekd: SUserPrivileges
Nicotine: UserPrivileged

Description

We ask the server whether a user is privileged or not.

Data Order

Server Code 123

Give Privileges

Function Names

Museekd: SGivePrivileges
Nicotine: GivePrivileges

Description

We give (part of) our privileges, specified in days, to another user on the network.

Data Order

Server Code 124

Notify Privileges

Function Names

Nicotine: NotifyPrivileges

Description

The server sends us a notification about our privileges.

Data Order

Server Code 125

Acknowledge Privilege Notification

Function Names

Nicotine: AckNotifyPrivileges

Description

Data Order

Server Code 126

Branch Level

Description

Tell the server what is our position in our branch (xth generation)

Function Names

Museekd: SBranchLevel Nicotine: Unimplemented

Data Order

Server Code 127

Branch Root

Description

Tell the server the username of the root of the branch we’re in

Function Names

Museekd: SBranchRoot
Nicotine: Unimplemented

Data Order

Server Code 129

Child depth

Description

Tell the server the maximum number of generation of children we have.

Function Names

Museekd: SChildDepth
Nicotine: Unimplemented

Data Order

Server Code 133

Private Room Users

Description

The server sends us a list of room users that we can alter (add operator abilities / dismember).

Function Names

Museekd: SPrivRoomAlterableMembers
Nicotine: PrivateRoomUsers

Data Order

Server Code 134

Private Room Add User

Description

We send this to inform the server that we’ve added a user to a private room.

Function Names

Museekd: SPrivRoomAddUser
Nicotine: PrivateRoomAddUser

Data Order

Server Code 135

Private Room Remove User

Description

We send this to inform the server that we’ve removed a user from a private room.

Function Names

Museekd: SPrivRoomRemoveUser
Nicotine: PrivateRoomRemoveUser

Data Order

Server Code 136

Private Room Drop Membership

Description

We send this to the server to remove our own membership of a private room.

Function Names

Museekd: SPrivRoomDismember
Nicotine: PrivateRoomDismember

Data Order

Server Code 137

Private Room Drop Ownership

Description

We send this to the server to stop owning a private room.

Function Names

Museekd: SPrivRoomDisown
Nicotine: PrivateRoomDisown

Data Order

Server Code 138

Private Room Unknown

Description

Unknown purporse

Function Names

Museekd: SPrivRoomUnknown138
Nicotine: PrivateRoomSomething

Data Order

Server Code 139

Private Room Added

Description

The server sends us this message when we are added to a private room.

Function Names

Museekd: SPrivRoomAdded
Nicotine: PrivateRoomAdded

Data Order

Server Code 140

Private Room Removed

Description

The server sends us this message when we are removed from a private room.

Function Names

Museekd: SPrivRoomRemoved
Nicotine: PrivateRoomRemoved

Data Order

Server Code 141

Private Room Toggle

Description

We send this when we want to enable or disable invitations to private rooms.

Function Names

Museekd: SPrivRoomToggle
Nicotine: PrivateRoomToggle

Data Order

Server Code 142

New Password

Description

We send this to the server to change our password. We receive a response if our password changes.

Function Names

Museekd: SNewPassword
Nicotine: ChangePassword

Data Order

Server Code 143

Private Room Add Operator

Description

We send this to the server to add private room operator abilities to a user.

Function Names

Museekd: SPrivRoomAddOperator
Nicotine: PrivateRoomAddOperator

Data Order

Server Code 144

Private Room Remove Operator

Description

We send this to the server to remove private room operator abilities from a user.

Function Names

Museekd: SPrivRoomRemoveOperator
Nicotine: PrivateRoomRemoveOperator

Data Order

Server Code 145

Private Room Operator Added

Description

The server send us this message when we’re given operator abilities in a private room.

Function Names

Museekd: SPrivRoomOperatorAdded
Nicotine: PrivateRoomOperatorAdded

Data Order

Server Code 146

Private Room Operator Removed

Description

The server send us this message when our operator abilities are removed in a private room.

Function Names

Museekd: SPrivRoomOperatorRemoved
Nicotine: PrivateRoomOperatorRemoved

Data Order

Server Code 148

Private Room Operators

Description

The server sends us a list of operators in a specific room, that we can remove operator abilities from.

Function Names

Museekd: SPrivRoomAlterableOperators
Nicotine: PrivateRoomOwned

Data Order

Server Code 149

Message Users

Description

Sends a broadcast private message to the given list of users.

Function Names

Museekd: SMessageUsers
Nicotine: Unimplemented

Data Order

Server Code 150

Ask Public Chat

Description

We ask the server to send us messages from all public rooms, also known as public chat.

Function Names

Museekd: SAskPublicChat
Nicotine: JoinPublicRoom

Data Order

Server Code 151

Stop Public Chat

Description

We ask the server to stop sending us messages from all public rooms, also known as public chat.

Function Names

Museekd: SStopPublicChat
Nicotine: LeavePublicRoom

Data Order

Server Code 152

Public Chat Message

Description

The server sends this when a new message has been written in a public room (every single line written in every public room).

Function Names

Museekd: SPublicChat
Nicotine: PublicRoomMessage

Data Order

Server Code 153

Related Searches

Description

The server returns a list of related search terms for a search query.

Function Names

Museekd: SRelatedSearch
Nicotine: Unimplemented

Data Order

Server Code 1001

Cannot Connect

Function Names

Museekd: SCannotConnect
Nicotine: CantConnectToPeer

Description

We send this to say we can’t connect to peer after it has asked us to connect. We receive this if we asked peer to connect and it can’t do this. This message means a connection can’t be established either way.

See also: Peer Connection Message Order

Data Order

Peer Messages

Send Receive
Send to Peer Receive from Peer

In museekd 0.1.13, these messages are sent and received in Museek/PeerConnection.cc and defined in Museek/PeerMessages.hh. Since museekd 0.2, they are defined in museekd/peermessages.h.

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 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

  1. User A sends a Peer Init to User B (Fails: socket cannot connect)
  2. User A sends ConnectToPeer to the Server with a unique token
  3. The Server sends a ConnectToPeer response to User B with the same token
  4. User B sends a Pierce Firewall to User A with the same token (if this fails connections are doomed)
  5. User B sends a Cannot Connect to the Server
  6. The Server sends a Cannot Connect response to User A

Peer Code 0

Pierce Firewall

Function Names

Nicotine: PierceFireWall

Description

This is the very first message sent by the peer that established a connection, if it has been asked by the other peer to do so. The token is taken from the ConnectToPeer server message.

See also: Peer Connection Message Order

Data Order

Peer Code 1

Peer Init

Function Names

Nicotine: PeerInit

Description

This message is sent by the peer that initiated a connection, not necessarily a peer that actually established it. Token apparently can be anything. Type is ‘P’ if it’s anything but filetransfer, ‘F’ otherwise.

See also: Peer Connection Message Order

Data Order

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 User Info Request
16 User 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

We send this to a peer to ask for a list of shared files.

Data Order

Peer Code 5

Shares Reply

Function Names

Museekd: PSharesReply
Nicotine: SharedFileList

Description

A peer responds with a list of shared files when we’ve sent a GetSharedFileList.

Data Order

Peer Code 8

Search Request

Function Names

Museekd: PSearchRequest
Nicotine: FileSearchRequest

Description

We send this to the peer when we search for a file. Alternatively, the peer sends this to tell us it is searching for a file.

Data Order

Peer Code 9

Search Reply

Function Names

Museekd: PSearchReply
Nicotine: FileSearchResult

Description

The peer sends this when it has a file search match. The token/ticket is taken from original FileSearchRequest message.

Data Order

Peer Code 15

User Info Request

Function Names

Museekd: PInfoRequest
Nicotine: UserInfoRequest

Description

We ask the other peer to send us their user information, picture and all.

Data Order

Peer Code 16

User Info Reply

Function Names

Museekd: PInfoReply
Nicotine: UserInfoReply

Description

A peer responds with this when we’ve sent a UserInfoRequest.

Data Order

Peer Code 36

Folder Contents Request

Function Names

Museekd: PFolderContentsRequest
Nicotine: FolderContentsRequest

Description

We ask the peer to send us the contents of a single folder.

Data Order

Peer Code 37

Folder Contents Reply

Function Names

Museekd: PFolderContentsReply
Nicotine: FolderContentsResponse

Description

A peer responds with the contents of a particular folder (with all subfolders) when we’ve sent a FolderContentsRequest.

Data Order

Peer Code 40

Transfer Request

Function Names

Museekd: PTransferRequest
Nicotine: TransferRequest

Description

We request a file from a peer, or tell a peer that we want to send a file to them.

Data Order

Peer Code 41 a

Upload Reply

Function Names

Museekd: PUploadReply
Nicotine: TransferResponse

Description

Response to TransferRequest - either we (or the other peer) agrees, or tells the reason for rejecting the file transfer.

Data Order

Peer Code 41 b

Download Reply

Function Names

Museekd: PDownloadReply
Nicotine: TransferResponse

Description

Response to TransferRequest - either we (or the other peer) agrees, or tells the reason for rejecting the file transfer.

Data Order

Peer Code 41 c

Transfer Reply

Function Names

Museekd: PTransferReply
Nicotine: TransferResponse

Description

Response to TransferRequest - either we (or the other peer) agrees, or tells the reason for rejecting the file transfer.

Data Order

Peer Code 42

Upload Placehold

Function Names

Museekd: PUploadPlacehold
Nicotine: PlaceholdUpload

Description

DEPRECATED

Data Order

Peer Code 43

Queue Upload or Download

Function Names

Museekd: PQueueDownload
Nicotine: QueueUpload

Description

Data Order

Peer Code 44

Place In Queue Reply

Function Names

Museekd: PPlaceInQueueReply
Nicotine: PlaceInQueue

Description

Data Order

Peer Code 46

Upload Failed

Function Names

Museekd: PUploadFailed
Nicotine: UploadFailed

Description

Data Order

Peer Code 50

Queue Failed

Function Names

Museekd: PQueueFailed
Nicotine: QueueFailed

Description

Data Order

Peer Code 51

Place In Queue Request

Function Names

Museekd: PPlaceInQueueRequest
Nicotine: PlaceInQueueRequest

Description

Data Order

Peer Code 52

Upload Queue Notification

Function Names

Museekd: PUploadQueueNotification
Nicotine: UploadQueueNotification

Description

Data Order

Distributed Messages

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. Since museekd 0.2, they are defined in museekd/distributedmessages.h.

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 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
93 Server Search Request

Distributed Code 0

Ping

Description

Send it every 60 sec.

Function Names

Museekd: DPing
Nicotine: DistribAlive

Data Order

Distributed Code 3

Search Request

Description

Search request that arrives through the distributed network. We transmit the search request to our children.

Search requests are sent to us by the server using SearchRequest if we’re a branch root, or by our parent using DistribSearch.

Function Names

Museekd: DSearchRequest
Nicotine: DistribSearch

Data Order

Distributed Code 4

Branch Level

Description

See SBranchLevel

Function Names

Museekd: DBranchLevel
Nicotine: Unimplemented

Data Order

Distributed Code 5

Branch Root

Description

See SBranchRoot

Function Names

Museekd: DBranchRoot
Nicotine: Unimplemented

Data Order

Distributed Code 7

Branch Level

Description

See SChildDepth

Function Names

Museekd: DChildDepth
Nicotine: Unimplemented

Data Order

Distributed Code 93

Server Search Request

Description

Search request that arrives through the distributed network. We transmit the search request to our children.

Search requests are sent to us by the server using SearchRequest if we’re a branch root, or by our parent using DistribSearch.

Function Names

Museekd: Unimplemented
Nicotine: DistribServerSearch

Data Order

Museek Data Types

StringMap

StringList

WStringList

WTickers

Recommendations, SimilarUsers, RoomList

NetInfo

UserData

  1. uint32 status Online Status
  2. uint32 avgspeed Average Speed
  3. uint32 downloadnum Number of downloaded files
  4. uint32 files Files shared
  5. uint32 dirs Directories shared
  6. bool slotsfree Slots free

RoomData

Folder

Shares

WFolder

Folders

WShares

WFolders

off_t