Last updated on 21 August 2020
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 |
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.
Message Length | Code | Message Contents |
---|---|---|
4 Bytes | 4 Bytes | ... |
Login
Museekd: SLogin
Nicotine: Login
Send your username, password, and client version.
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
- Send Login
- string username
- string password A non-empty string is required
- uint32 version number 183 for Museek+ 157 for Nicotine+
- string MD5 hex digest of concatenated username & password
- uint32 minor version Minor version (0x13000000 for 157 ns 13e, 0x11000000 for 157 ns 13c)
- 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.
Set Listen Port
Museekd: SSetListenPort
Nicotine: SetWaitPort
We send this to the server to indicate the port number that we listen on (2234 by default).
- Send
- uint32 port
- Receive
- No Message
Get Peer Address
Museekd: SGetPeerAddress
Nicotine: GetPeerAddress
We send this to the server to ask for a peer's address (IP address and port), given the peer's username.
- Send
- string username
- Receive
- string username
- ip ip
- int port
Add User
Museekd: SAddUser
Nicotine: AddUser
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.
- 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)
Remove User
Museekd: Unimplemented
Nicotine: RemoveUser
Used when we no longer want to be kept updated about a user's stats.
- Send
- string username
- Receive
- No Message
Get Status
Museekd: SGetStatus
Nicotine: GetUserStatus
The server tells us if a user has gone away or has returned.
- Send
- string username
- Receive
- string username
- int status 0 == Offline, 1 == Away; 2 == Online
- bool privileged
Say in Chat Room
Museekd: SSayChatroom
Nicotine: SayChatroom
Either we want to say something in the chatroom, or someone else did.
- Send
- string room
- string message
- Receive
- string room
- string username
- string message
Join a Room
Museekd: SJoinRoom
Nicotine: JoinRoom
Server sends us this message when we join a room. Contains users list with data on everyone.
- Send
- string room
- Receive
- string room
- int number of users in room For private rooms, also contain owner and operators
- 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
- Iterate thru number of usercountries
- string countrycode Uppercase country code
- string owner If private room
- int number of operators in room If private room
- Iterate the number of operators
museekd uses a vector of strings
- string operator
Leave Room
Museekd: SLeaveRoom
Nicotine: LeaveRoom
We send this to the server when we want to leave a room.
- Send
- string room
- Receive
- string room
A User Joined a Room
Museekd: SUserJoinedRoom
Nicotine: UserJoinedRoom
The server tells us someone has just joined a room we're in.
- 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
A User Left a Room
Museekd: SUserLeftRoom
Nicotine: UserLeftRoom
The server tells us someone has just left a room we're in.
- Send
- No Message
- Receive
- string room
- string username
Connect To Peer
Museekd: SConnectToPeer
Nicotine: ConnectToPeer
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
- 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
- bool privileged
Private Messages
Museekd: SPrivateMessage
Nicotine: MessageUser
Chat phrase sent to someone or received by us in private.
- Send
- string username
- string message
- Receive
- int ID
- int timestamp
- string username
- string message
- bool isAdmin 1 if sent by server, else not present
Acknowledge Private Message
Museekd: SAckPrivateMessage
Nicotine: MessageAcked
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.
- Send
- int message ID
- Receive
- No Message
File Search
Museekd: SFileSearch
Nicotine: FileSearch
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.
- Send
- int ticket
- string search query
- Receive search request from another user
- string username
- int ticket
- string search query
Set Online Status
Museekd: SSetStatus
Nicotine: SetStatus
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
- Send
- int status
- Receive
- No Message
Ping
Museekd: SPing
Nicotine: ServerPing
We test if the server responds.
- Send
- Empty Message
- Receive
- Empty Message
Send Speed
Museekd: SSendSpeed
Nicotine: SendSpeed
DEPRECIATED
We used to send this after a finished download to let the server update the speed statistics for a user.
- Send average transfer speed
- string username
- int speed
- Receive
- No Message
Shared Folders & Files
Museekd: SSharedFoldersFiles
Nicotine: SharedFoldersFiles
We send this to server to indicate the number of folder and files that we share.
- Send
- int dirs
- int files
- Receive
- No Message
Get User Stats
Museekd: SGetUserStats
Nicotine: GetUserStats
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.
- Send
- string username
- Receive
- string username
- int avgspeed
- off_t downloadnum
- int files
- int dirs
Queued Downloads
Museekd: Unimplemented
Nicotine: QueuedDownloads
DEPRECIATED
The server sends this to indicate if someone has download slots available or not.
- Send
- No Message
- Receive
- string username
- bool slotsfree Can immediately download
Kicked from Server
Museekd: SKicked
Nicotine: Relogged
The server sends this if someone else logged in under our nickname, and then disconnects us.
- Send
- No Message
- Receive
- Empty Message
User Search
Museekd: SUserSearch
Nicotine: UserSearch
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.
- Send
- string username
- int ticket
- string search query
- Receive
- No Message
Add Liked Interest
Museekd: SInterestAdd
Nicotine: AddThingILike
We send this to the server when we add an item to our likes list.
- Send
- string item
- Receive
- No Message
Remove Liked Interest
Museekd: SInterestRemove
Nicotine: RemoveThingILike
We send this to the server when we remove an item from our likes list.
- Send
- string item
- Receive
- No Message
Get Recommendations
Museekd: SGetRecommendations
Nicotine: Recommendations
The server sends us a list of personal recommendations and a number for each.
- 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)
Get Global Recommendations
Museekd: SGetGlobalRecommendations
Nicotine: GlobalRecommendations
The server sends us a list of global recommendations and a number for each.
- 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)
Get User Interests
Museekd: SUserInterests
Nicotine: UserInterests
We ask the server for a user's liked and hated interests. The server responds with a list of interests.
- 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
Place In Line Response
DEPRECIATED
The server tells us a new room has been added.
Museekd: Unimplemented
Nicotine: PlaceInLineResponse
- Send
- string user
- int req
- int place
- Receive
- string user
- int req
- int place
Room Added
DEPRECIATED
The server tells us a new room has been added.
Museekd: Unimplemented
Nicotine: RoomAdded
- Send
- No Message
- Receive
- string room
Room Removed
DEPRECIATED
The server tells us a room has been removed.
Museekd: Unimplemented
Nicotine: RoomRemoved
- Send
- No Message
- Receive
- string room
Room List
Museekd: SRoomList
Nicotine: RoomList
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.
- Send
- Empty Message
- Receive
- int number of rooms
- Iterate for number of rooms
- string room
- int number of rooms
- Iterate for number of rooms
- int number of users in room
- int number of owned private rooms
- Iterate for number of owned private
rooms
- string owned private room
- int number of owned private rooms
- Iterate for number of owned private
rooms
- int number of users in owned private room
- int number of private rooms (except owned)
- Iterate for number of private rooms (except
owned)
- string private room
- int number of private rooms (except owned)
- Iterate for number of private rooms (except
owned)
- int number of users in private rooms (except owned)
- int number of operated private rooms
- Iterate for number of operated private
rooms
- string operated private room
Exact File Search
Museekd: SExactFileSearch
Nicotine: ExactFileSearch
DEPRECIATED (no results even with official client)
Someone is searching for a file with an exact name.
- Send
- No Message
- Receive
- string username
- uint32 ticket
- string filename
- string path
- off_t filesize
- uint32 checkum
Global / Admin Message
Museekd: SGlobalMessage
Nicotine: AdminMessage
A global message from the server admin has arrived.
- Send
- No Message
- Receive
- string message
Global User List
Museekd: Unimplemented
Nicotine: GlobalUserList
DEPRECIATED
We send this to get a global list of all users online.
- Send
- Empty Message
- Receive
- int number of users in room
- Iterate the number of users
- string user
- int number of userdata
- Iterate the number of users
- int status
- int number of userdata
- Iterate the userdata
- int avgspeed
- off_t downloadnum
- int files
- int dirs
- int number of slotsfree
- Iterate thru number of slotsfree
- int slotsfree
- int number of usercountries
- Iterate thru number of usercountries
- string countrycode Uppercase country code
Privileged Users
Museekd: SPrivilegedUsers
Nicotine: PrivilegedUsers
The server sends us a list of privileged users, a.k.a. users who have donated.
- Send
- No Message
- Receive
- int number of users
- Iterate number of users
- string user
Have No Parents
Museekd: SHaveNoParents
Nicotine: HaveNoParent
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.
- Send
- bool have_parents (is a boolean internal to museekd)
- Receive
- No Message
Parent's IP
Museekd: SParentIP
Nicotine: SearchParent
We send the IP address of our parent to the server.
- Send
- ip ip
- Receive
- No Message
Parent Min Speed
Unknown purpose
Museekd: SParentMinSpeed
Nicotine: ParentMinSpeed (unused)
- Send
- No Message
- Receive
- int number
Parent Speed Ratio
Unknown purpose
Museekd: SParentSpeedRatio
Nicotine: ParentSpeedRatio (unused)
- Send
- No Message
- Receive
- int number
Parent Inactivity Timeout
DEPRECIATED
Museekd: SParentInactivityTimeout
Nicotine: ParentInactivityTimeout
- Send
- No Message
- Receive
- int number
Search Inactivity Timeout
DEPRECIATED
Museekd: SSearchInactivityTimeout
Nicotine: SearchInactivityTimeout
- Send
- No Message
- Receive
- int number
Minimum Parents In Cache
DEPRECIATED
Museekd: SMinParentsInCache
Nicotine: MinParentsInCache
- Send
- No Message
- Receive
- int number
Distributed Alive Interval
DEPRECIATED
Museekd: SDistribAliveInterval
Nicotine: DistribAliveInterval
- Send
- No Message
- Receive
- int number
Add Privileged User
Museekd: SAddPrivileged
Nicotine: AddToPrivileged
The server sends us the username of a new privileged user, which we add to our list of global privileged users.
- Send
- No Message
- Receive
- string user
Check Privileges
Museekd: SCheckPrivileges
Nicotine: CheckPrivileges
We ask the server how much time we have left of our privileges. The server responds with the remaining time, in seconds.
- Send
- Empty Message
- Receive
- int time_left
Search Request
The server sends us search requests from other users.
Museekd: SSearchRequest
Nicotine: SearchRequest
- Send
- No Message
- Receive
- uint8 distributed code (DSearchRequest)
- int unknown
- string username
- int token
- string query
Accept Children
We tell the server if we want to accept child nodes.
Museekd: SAcceptChildren
Nicotine: AcceptChildren (not yet used)
- Send
- bool accept
- Receive
- No Message
Possible Parents
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.
Museekd: SNetInfo
Nicotine: PossibleParents
- Send
- No Message
- Receive list of search parents
- int number of parents
- Iterate for number of parents
- string user
- IP IP address
- int port
Wishlist Search
Museekd: SWishlistSearch
Nicotine: WishlistSearch
- Send
- int ticket
- string search query
- Receive
- No Message
Wishlist Interval
Museekd: SWishlistInterval
Nicotine: WishlistInterval
- Send
- No Message
- Receive
- int interval
Get Similar Users
Museekd: SGetSimilarUsers
Nicotine: SimilarUsers
The server sends us a list of similar users related to our interests.
- Send
- Empty Message
- Receive
- int number of users
- Iterate for number of user
- string user
- int status
Get Item Recommendations
Museekd: SGetItemRecommendations
Nicotine: ItemRecommendations
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.
- 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)
Get Item Similar Users
Museekd: SGetItemSimilarUsers
Nicotine: ItemSimilarUsers
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.
- Send
- string item
- Receive
- string item
- int number of users
- Iterate for number of user
- string user
- int 0
Room Tickers
Museekd: SRoomTickers
Nicotine: RoomTickerState
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.
- Send
- No Message
- Receive
- string room
- int number of users
- Iterate for number of user
- string user
- string tickers
Room Ticker Add
Museekd: SRoomTickerAdd
Nicotine: RoomTickerAdd
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.
- Send
- No Message
- Receive
- string room
- string user
- string ticker
Room Ticker Remove
Museekd: SRoomTickerRemove
Nicotine: RoomTickerRemove
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.
- Send
- No Message
- Receive
- string room
- string user
Set Room Ticker
Museekd: SSetRoomTicker
Nicotine: RoomTickerSet
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.
- Send
- string room
- string ticker
- Receive
- No Message
Add Hated Interest
Museekd: SInterestHatedAdd
Nicotine: AddThingIHate
We send this to the server when we add an item to our hate list.
- Send
- string item
- Receive
- No Message
Remove Hated Interest
Museekd: SInterestHatedRemove
Nicotine: RemoveThingIHate
We send this to the server when we remove an item from our hate list.
- Send
- string item
- Receive
- No Message
Room Search
Museekd: SRoomSearch
Nicotine: RoomSearch
- Send
- string room
- string ticket
- string search query
- Receive
- No Message
Send Upload Speed
Museekd: SSendUploadSpeed
Nicotine: SendUploadSpeed
We send this after a finished upload to let the server update the speed statistics for ourselves.
- Send average upload transfer speed
- int speed
- Receive
- No Message
User Privileges
Museekd: SUserPrivileges
Nicotine: UserPrivileged
We ask the server whether a user is privileged or not.
- Send
- string user
- Receive
- string user
- char privileged (boolean internal to museekd)
Give Privileges
Museekd: SGivePrivileges
Nicotine: GivePrivileges
We give (part of) our privileges, specified in days, to another user on the network.
- Send
- string user
- int days
- Receive
- No Message
Notify Privileges
Nicotine: NotifyPrivileges
The server sends us a notification about our privileges.
- Send
- int token
- string user
- Receive
- int token
- string user
Acknowledge Privilege Notification
Nicotine: AckNotifyPrivileges
- Send
- int token
- Receive
- int token
Branch Level
Tell the server what is our position in our branch (xth generation)
Museekd: SBranchLevel Nicotine: Unimplemented
- Send
- int branch_level
- Receive
- No Message
Branch Root
Tell the server the username of the root of the branch we're in
Museekd: SBranchRoot
Nicotine: Unimplemented
- Send
- string branch_root
- Receive
- No Message
Child depth
Tell the server the maximum number of generation of children we have.
Museekd: SChildDepth
Nicotine: Unimplemented
- Send
- int child_depth
- Receive
- No Message
Private Room Users
The server sends us a list of room users that we can alter (add operator abilities / dismember).
Museekd: SPrivRoomAlterableMembers
Nicotine: PrivateRoomUsers
- Send
- No Message
- Receive
- string room
- int number of users
- Iterate for number of users
- string users
Private Room Add User
We send this to inform the server that we've added a user to a private room.
Museekd: SPrivRoomAddUser
Nicotine: PrivateRoomAddUser
- Send
- string room
- string user
- Receive
- string room
- string user
Private Room Remove User
We send this to inform the server that we've removed a user from a private room.
Museekd: SPrivRoomRemoveUser
Nicotine: PrivateRoomRemoveUser
- Send
- string room
- string user
- Receive
- string room
- string user
Private Room Drop Membership
We send this to the server to remove our own membership of a private room.
Museekd: SPrivRoomDismember
Nicotine: PrivateRoomDismember
- Send
- string room
- Receive
- No Message
Private Room Drop Ownership
We send this to the server to stop owning a private room.
Museekd: SPrivRoomDisown
Nicotine: PrivateRoomDisown
- Send
- string room
- Receive
- No Message
Private Room Unknown
Unknown purporse
Museekd: SPrivRoomUnknown138
Nicotine: PrivateRoomSomething
- Send
- string room
- Receive
- string room
Private Room Added
The server sends us this message when we are added to a private room.
Museekd: SPrivRoomAdded
Nicotine: PrivateRoomAdded
- Send
- No Message
- Receive
- string room
Private Room Removed
The server sends us this message when we are removed from a private room.
Museekd: SPrivRoomRemoved
Nicotine: PrivateRoomRemoved
- Send
- No Message
- Receive
- string room
Private Room Toggle
We send this when we want to enable or disable invitations to private rooms.
Museekd: SPrivRoomToggle
Nicotine: PrivateRoomToggle
- Send
- bool enable
- Receive
- bool enable
New Password
We send this to the server to change our password. We receive a response if our password changes.
Museekd: SNewPassword
Nicotine: ChangePassword
- Send
- string pass
- Receive
- string pass
Private Room Add Operator
We send this to the server to add private room operator abilities to a user.
Museekd: SPrivRoomAddOperator
Nicotine: PrivateRoomAddOperator
- Send
- string room
- string operator
- Receive
- string room
- string operator
Private Room Remove Operator
We send this to the server to remove private room operator abilities from a user.
Museekd: SPrivRoomRemoveOperator
Nicotine: PrivateRoomRemoveOperator
- Send
- string room
- Receive
- string room
Private Room Operator Added
The server send us this message when we're given operator abilities in a private room.
Museekd: SPrivRoomOperatorAdded
Nicotine: PrivateRoomOperatorAdded
- Send
- No Message
- Receive
- string room
Private Room Operator Removed
The server send us this message when our operator abilities are removed in a private room.
Museekd: SPrivRoomOperatorRemoved
Nicotine: PrivateRoomOperatorRemoved
- Send
- No Message
- Receive
- string room
Private Room Operators
The server sends us a list of operators in a specific room, that we can remove operator abilities from.
Museekd: SPrivRoomAlterableOperators
Nicotine: PrivateRoomOwned
- Send
- No Message
- Receive
- string room
- int number of operators in room
- Iterate the number of operators
museekd uses a vector of strings
- string operator
Message Users
Sends a broadcast private message to the given list of users.
Museekd: SMessageUsers
Nicotine: Unimplemented
- Send
- int number of users
- Iterate the number of users
museekd uses a vector of strings
- string user
- string message
- Receive
- No Message
Ask Public Chat
We ask the server to send us messages from all public rooms, also known as public chat.
Museekd: SAskPublicChat
Nicotine: JoinPublicRoom
- Send
- Empty Message
- Receive
- No Message
Stop Public Chat
We ask the server to stop sending us messages from all public rooms, also known as public chat.
Museekd: SStopPublicChat
Nicotine: LeavePublicRoom
- Send
- Empty Message
- Receive
- No Message
Public Chat Message
The server sends this when a new message has been written in a public room (every single line written in every public room).
Museekd: SPublicChat
Nicotine: PublicRoomMessage
- Send
- No Message
- Receive
- string room
- string user
- string message
Related Searches
The server returns a list of related search terms for a search query.
Museekd: SRelatedSearch
Nicotine: Unimplemented
- Send
- string query
- Receive
- string query
- int number of terms
- Iterate for number of term
- string term
- int score
Cannot Connect
Museekd: SCannotConnect
Nicotine: CantConnectToPeer
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
- 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
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.
Message Length | Code | Message Contents |
---|---|---|
4 Bytes | 1 Byte | ... |
Code | Message |
---|---|
0 | Pierce Firewall |
1 | Peer Init |
- 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
Pierce Firewall
Nicotine: PierceFireWall
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
- Send
- uint32 token Unique Number
- Receive
- uint32 token Unique Number
Peer Init
Nicotine: PeerInit
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
- 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
Message Length | Code | Message Contents |
---|---|---|
4 Bytes | 4 Bytes | ... |
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 |
Shares Request
Museekd: PSharesRequest
Nicotine: GetShareFileList
We send this to a peer to ask for a list of shared files.
- Send
- Empty Message
- Receive
- Empty Message
Shares Reply
Museekd: PSharesReply
Nicotine: SharedFileList
A peer responds with a list of shared files when we've sent a GetSharedFileList.
- 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
Search Request
Museekd: PSearchRequest
Nicotine: FileSearchRequest
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.
- Send
- int ticket
- string query
- Receive
- int ticket
- string query
Search Reply
Museekd: PSearchReply
Nicotine: FileSearchResult
The peer sends this when it has a file search match. The token/ticket is taken from original FileSearchRequest message.
- Send
- string user
- int ticket
- int results size number of results
- Iterate for number of results
- uchar 1
- string filename
- off_t size
- string ext
- int attribute size
- Iterate number of attributes
- int place in attributes
- int attribute
- bool slotfree
- int avgspeed
- off_t queue length
- Receive
- decompress
- 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
- bool slotfree
- int avgspeed
- off_t queue length
User Info Request
Museekd: PInfoRequest
Nicotine: UserInfoRequest
We ask the other peer to send us their user information, picture and all.
- Send
- Empty Message
- Receive
- Empty Message
User Info Reply
Museekd: PInfoReply
Nicotine: UserInfoReply
A peer responds with this when we've sent a UserInfoRequest.
- 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
Folder Contents Request
Museekd: PFolderContentsRequest
Nicotine: FolderContentsRequest
We ask the peer to send us the contents of a single folder.
- 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
Folder Contents Reply
Museekd: PFolderContentsReply
Nicotine: FolderContentsResponse
A peer responds with the contents of a particular folder (with all subfolders) when we've sent a FolderContentsRequest.
- 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
- decompress
- 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
Transfer Request
Museekd: PTransferRequest
Nicotine: TransferRequest
We request a file from a peer, or tell a peer that we want to send a file to them.
- 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
Upload Reply
Museekd: PUploadReply
Nicotine: TransferResponse
Response to TransferRequest - either we (or the other peer) agrees, or tells the reason for rejecting the file transfer.
- Send
- string ticket
- uchar allowed
- Check contents of allowed
- off_t filesize if allowed == 1
- string reason if allowed == 0
- Receive
- No Message
Download Reply
Museekd: PDownloadReply
Nicotine: TransferResponse
Response to TransferRequest - either we (or the other peer) agrees, or tells the reason for rejecting the file transfer.
- Send
- string ticket
- uchar allowed
- Check contents of allowed
- string reason if allowed == 0
- Receive
- No Message
Transfer Reply
Museekd: PTransferReply
Nicotine: TransferResponse
Response to TransferRequest - either we (or the other peer) agrees, or tells the reason for rejecting the file transfer.
- Send
- No Message
- Receive
- string ticket
- char allowed == 1
- Check contents of allowed
- off_t filesize if allowed == 1
- string reason if allowed == 0
Upload Placehold
Museekd: PUploadPlacehold
Nicotine: PlaceholdUpload
DEPRECIATED
- Send
- string filename
- Receive
- string filename
Queue Upload or Download
Museekd: PQueueDownload
Nicotine: QueueUpload
- Send
- string filename
- Receive
- string filename
Place In Queue Reply
Museekd: PPlaceInQueueReply
Nicotine: PlaceInQueue
- Send
- string filename
- string place
- Receive
- string filename
- string place
Upload Failed
Museekd: PUploadFailed
Nicotine: UploadFailed
- Send
- string filename
- Receive
- string filename
Queue Failed
Museekd: PQueueFailed
Nicotine: QueueFailed
- Send
- string filename
- string reason
- Receive
- string filename
- string reason
Place In Queue Request
Museekd: PPlaceInQueueRequest
Nicotine: PlaceInQueueRequest
- Send
- string filename
- Receive
- string filename
Upload Queue Notification
Museekd: PUploadQueueNotification
Nicotine: UploadQueueNotification
- Send
- Empty Message
- Receive
- Empty Message
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.
Message Length | Code | Message Contents |
---|---|---|
4 Bytes | 1 Byte | ... |
Code | Message |
---|---|
0 | Ping |
3 | Search Request |
4 | Branch Level |
5 | Branch Root |
7 | Child Depth |
93 | Server Search Request |
Ping
Send it every 60 sec.
Museekd: DPing
Nicotine: DistribAlive
- Send
- Empty Message
- Receive
- uint32 unknown
Search Request
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.
Museekd: DSearchRequest
Nicotine: DistribSearch
- Send
- int unknown
- string user
- int ticket
- string query
- Receive
- int unknown
- string user
- int ticket
- string query
Branch Level
See SBranchLevel
Museekd: DBranchLevel
Nicotine: Unimplemented
- Send
- uint32 branch_level
- Receive
- uint32 branch_level
Branch Root
See SBranchRoot
Museekd: DBranchRoot
Nicotine: Unimplemented
- Send
- string branch_root
- Receive
- string branch_root
Branch Level
See SChildDepth
Museekd: DChildDepth
Nicotine: Unimplemented
- Send
- uint32 child_depth
- Receive
- uint32 child_depth
Server Search Request
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.
Museekd: Unimplemented
Nicotine: DistribServerSearch
- Send
- off_t unknown always 210503729152 (?)
- string user
- int ticket
- string query
- Receive
- off_t unknown always 210503729152 (?)
- string user
- int ticket
- string query
- std::map<std::string, std::string>
- std::vector<std::string>
- std::vector<std::wstring> WStringList
- std::map<std::string, std::wstring>
- std::map<std::string, uint32>
- std::map<std::string, std::pair<std::string, uint32> >
- 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
- std::map<std::string, UserData>
- std::map<std::string, FileEntry>
- std::map<std::string, Folder>
- std::map<std::wstring, FileEntry>
- std::map<std::string, Shares>
- std::map<std::wstring, WFolder>
- std::map<std::wstring, WShares>
- Packed as a 64bit Integer