= The Soulseek Protocol = Return to [http://www.museek-plus.org/wiki/DevelopingMuseekPlus Developing Museek Plus] or to [http://www.nicotine-plus.org/wiki/DevelopingNicotinePlus 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 = [wiki:SoulseekProtocol#ServerMessages Server Messages] [wiki:SoulseekProtocol#PeerMessages Peer Messages] [wiki:SoulseekProtocol#DistributedMessages Distributed Messages] [wiki:SoulseekProtocol#MuseekDataTypes 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 [http://seeschloss.org/soulfind.html 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 || [wiki:SoulseekProtocol#ServerCode1 Login] || || 2 || [wiki:SoulseekProtocol#ServerCode2 Set Listen Port] || || 3 || [wiki:SoulseekProtocol#ServerCode3 Get Peer Address] || 5 || [wiki:SoulseekProtocol#ServerCode5 Add User] || || 6 || [wiki:SoulseekProtocol#ServerCode6 Unknown] || || 7 || [wiki:SoulseekProtocol#ServerCode7 Get Status] || || 13 || [wiki:SoulseekProtocol#ServerCode13 Say in Chat Room] || || 14 || [wiki:SoulseekProtocol#ServerCode14 Join Room] || || 15 || [wiki:SoulseekProtocol#ServerCode15 Leave Room] || || 16 || [wiki:SoulseekProtocol#ServerCode16 User Joined Room] || || 17 || [wiki:SoulseekProtocol#ServerCode17 User Left Room] || || 18 || [wiki:SoulseekProtocol#ServerCode18 Connect To Peer] || || 22 || [wiki:SoulseekProtocol#ServerCode22 Private Messages] || || 23 || [wiki:SoulseekProtocol#ServerCode23 Acknowledge Private Message] || || 26 || [wiki:SoulseekProtocol#ServerCode26 File Search] || || 28 || [wiki:SoulseekProtocol#ServerCode28 Set Online Status] || || 32 || [wiki:SoulseekProtocol#ServerCode32 Ping] || || 34 || [wiki:SoulseekProtocol#ServerCode34 Send Speed] || || 35 || [wiki:SoulseekProtocol#ServerCode35 Shared Folders & Files] || || 36 || [wiki:SoulseekProtocol#ServerCode36 Get User Stats] || || 40 || [wiki:SoulseekProtocol#ServerCode40 Queued Downloads] || || 41 || [wiki:SoulseekProtocol#ServerCode41 Kicked from Server] || || 42 || [wiki:SoulseekProtocol#ServerCode42 User Search] || || 51 || [wiki:SoulseekProtocol#ServerCode51 Interest Add] || || 52 || [wiki:SoulseekProtocol#ServerCode52 Interest Remove] || || 54 || [wiki:SoulseekProtocol#ServerCode54 Get Recommendations] || || 56 || [wiki:SoulseekProtocol#ServerCode56 Get Global Recommendations] || || 57 || [wiki:SoulseekProtocol#ServerCode57 Get User Interests] || || 64 || [wiki:SoulseekProtocol#ServerCode64 Room List] || || 65 || [wiki:SoulseekProtocol#ServerCode65 Exact File Search] || || 66 || [wiki:SoulseekProtocol#ServerCode66 Global/Admin Message] || || 69 || [wiki:SoulseekProtocol#ServerCode69 Privileged Users] || || 71 || [wiki:SoulseekProtocol#ServerCode71 Have No Parents] || || 73 || [wiki:SoulseekProtocol#ServerCode73 Parent's IP] || || 83 || [wiki:SoulseekProtocol#ServerCode83 ParentMinSpeed] || || 84 || [wiki:SoulseekProtocol#ServerCode84 ParentSpeedRatio] || || 86 || [wiki:SoulseekProtocol#ServerCode86 Parent Inactivity Timeout] || || 87 || [wiki:SoulseekProtocol#ServerCode87 Search Inactivity Timeout] || || 88 || [wiki:SoulseekProtocol#ServerCode88 Minimum Parents In Cache] || || 90 || [wiki:SoulseekProtocol#ServerCode90 Distributed Alive Interval] || || 91 || [wiki:SoulseekProtocol#ServerCode91 Add Privileged User] || || 92 || [wiki:SoulseekProtocol#ServerCode92 Check Privileges] || || 93 || [wiki:SoulseekProtocol#ServerCode93 Search Request] || || 100 || [wiki:SoulseekProtocol#ServerCode100 Accept Children] || || 102 || [wiki:SoulseekProtocol#ServerCode102 Net Info] || || 103 || [wiki:SoulseekProtocol#ServerCode103 Wishlist Search] || || 104 || [wiki:SoulseekProtocol#ServerCode104 Wishlist Interval] || || 110 || [wiki:SoulseekProtocol#ServerCode110 Get Similar Users] || || 111 || [wiki:SoulseekProtocol#ServerCode111 Get Item Recommendations] || || 112 || [wiki:SoulseekProtocol#ServerCode112 Get Item Similar Users] || || 113 || [wiki:SoulseekProtocol#ServerCode113 Room Tickers] || || 114 || [wiki:SoulseekProtocol#ServerCode114 Room Ticker Add] || || 115 || [wiki:SoulseekProtocol#ServerCode115 Room Ticker Remove] || || 116 || [wiki:SoulseekProtocol#ServerCode116 Set Room Ticker] || || 117 || [wiki:SoulseekProtocol#ServerCode117 Hated Interest Add] || || 118 || [wiki:SoulseekProtocol#ServerCode118 Hated Interest Remove] || || 120 || [wiki:SoulseekProtocol#ServerCode120 Room Search] || || 121 || [wiki:SoulseekProtocol#ServerCode121 Send Upload Speed] || || 122 || [wiki:SoulseekProtocol#ServerCode122 User Privileges] || || 123 || [wiki:SoulseekProtocol#ServerCode123 Give Privileges] || || 124 || [wiki:SoulseekProtocol#ServerCode124 Notify Privileges] || || 125 || [wiki:SoulseekProtocol#ServerCode125 Acknowledge Notify Privileges] || || 126 || [wiki:SoulseekProtocol#ServerCode126 Branch Level] || || 127 || [wiki:SoulseekProtocol#ServerCode127 Branch Root] || || 129 || [wiki:SoulseekProtocol#ServerCode129 Child Depth] || || 133 || [wiki:SoulseekProtocol#ServerCode133 Private Room Users] || || 134 || [wiki:SoulseekProtocol#ServerCode134 Private Room Add User] || || 135 || [wiki:SoulseekProtocol#ServerCode135 Private Room Remove User] || || 136 || [wiki:SoulseekProtocol#ServerCode136 Private Room Drop Membership] || || 137 || [wiki:SoulseekProtocol#ServerCode137 Private Room Drop Ownership] || || 138 || [wiki:SoulseekProtocol#ServerCode138 Private Room Unknown] || || 139 || [wiki:SoulseekProtocol#ServerCode139 Private Room Added] || || 140 || [wiki:SoulseekProtocol#ServerCode140 Private Room Removed] || || 141 || [wiki:SoulseekProtocol#ServerCode141 Private Room Toggle] || || 142 || [wiki:SoulseekProtocol#ServerCode142 New Password] || || 143 || [wiki:SoulseekProtocol#ServerCode143 Private Room Add Operator] || || 144 || [wiki:SoulseekProtocol#ServerCode144 Private Room Remove Operator] || || 145 || [wiki:SoulseekProtocol#ServerCode145 Private Room Operator Added] || || 146 || [wiki:SoulseekProtocol#ServerCode146 Private Room Operator Removed] || || 148 || [wiki:SoulseekProtocol#ServerCode148 Private Room Owned] || || 149 || [wiki:SoulseekProtocol#ServerCode149 Message Users] || || 150 || [wiki:SoulseekProtocol#ServerCode150 Ask Public Chat] || || 151 || [wiki:SoulseekProtocol#ServerCode151 Stop Public Chat] || || 152 || [wiki:SoulseekProtocol#ServerCode152 Public Chat] || || 1001 ||[wiki:SoulseekProtocol#ServerCode1001 Cannot Connect] || === Server Code 1 === '''Login''' ==== Function Names ==== Museekd: SLogin [[BR]]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 1. '''string''' __username__ 1. '''string''' __password__ '''A non-empty string is required''' 1. '''uint32''' __version number__ ''182'' for Museek+ ''181'' for Nicotine+ 1. '''string''' __MD5 hex digest of concatenated username & password__ 1. '''uint32''' __minor version__ Minor version (0x13000000 for 157 ns 13e, 0x11000000 for 157 ns 13c) * Receive Login Success 1. '''uchar''' __success__ 1 1. '''string''' __greet__ A MOTD string 1. '''uint32''' __Your IP Address__ 1. '''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 1. '''uchar''' __failure__ ''0'' 1. '''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 [[BR]]Nicotine: '''SetWaitPort''' ==== Description ==== The port you listen for connections on (2234 by default) ==== Data Order ==== * Send 1. '''uint32''' __port__ * Receive * ''No Message'' === Server Code 3 === '''Get Peer Address''' ==== Function Names ==== Museekd: SGetPeerAddress [[BR]]Nicotine: '''GetPeerAddress''' ==== Description ==== A server for a user's IP Address and port ==== Data Order ==== * Send 1. '''string''' __username__ * Receive 1. '''string''' __username__ 1. '''ip''' __ip__ 1. '''int''' __port__ === Server Code 5 === '''Add User ''' ==== Function Names ==== Museekd: SAddUser [[BR]]Nicotine: '''AddUser''' ==== Description ==== Watch this user's status ==== Data Order ==== * Send 1. '''string''' __username__ * Receive 1. '''string''' __username__ 1. '''char''' __exists__ ''converted to Boolean'' * If __exists__ is 1/True (may not be implemented) 1. '''int''' __status__ ''0 == Offline, 1 == Away; 2 == Online'' 1. '''int''' __avgspeed__ 1. '''off_t''' __downloadnum__ 1. '''int''' __files__ 1. '''int''' __dirs__ 1. '''string''' __Country Code__ (may not be implemented) === Server Code 6 === '''Unknown''' ==== Function Names ==== Museekd: Not implemented [[BR]]Nicotine: '''Not implemented''' ==== Description ==== Something to do with user status. Usually sent just after SAddUser ==== Data Order ==== * Send 1. '''string''' __username__ * Receive * ''No Message'' === Server Code 7 === '''Get Status''' ==== Function Names ==== Museekd: SGetStatus [[BR]]Nicotine: '''GetUserStatus''' ==== Description ==== ==== Data Order ==== * Send 1. '''string''' __username__ * Receive 1. '''string''' __username__ 1. '''int''' __status__ ''0 == Offline, 1 == Away; 2 == Online'' 1. '''bool''' __privileged__ === Server Code 13 === '''Say in Chat Room''' ==== Function Names ==== Museekd: SSayChatroom [[BR]]Nicotine: '''SayChatroom''' ==== Description ==== ==== Data Order ==== * Send 1. '''string''' __room__ 1. '''string''' __message__ * Receive 1. '''string''' __room__ 1. '''string''' __username__ 1. '''string''' __message__ === Server Code 14 === '''Join a Room''' ==== Function Names ==== Museekd: SJoinRoom [[BR]]Nicotine: '''JoinRoom''' ==== Description ==== ==== Data Order ==== * Send 1. '''string''' __room__ * Receive 1. '''string''' __room__ 1. '''int''' __number of users in room__ '''For private rooms, also contain owner and operators''' 1. Iterate the __number of users__ '''museekd uses a vector of strings''' 1. '''string''' __user__ 1. '''int''' __number of userdata__ 1. Iterate the __number of users__ '''museekd uses a vector of userdata''' 1. '''int''' __status__ 1. '''int''' __number of userdata__ 1. Iterate the userdata '''vector of userdata''' (and add unpacked data to [wiki:SoulseekProtocol#UserData User Data]) 1. '''int''' __avgspeed__ 1. '''off_t''' __downloadnum__ 1. '''int''' __files__ 1. '''int''' __dirs__ 1. '''int''' __number of slotsfree__ 1. Iterate thru number of slotsfree 1. '''int''' __slotsfree__ 1. '''int''' __number of usercountries__ 1. Iterate thru number of usercountries 1. '''string''' __countrycode__ '''Uppercase country code''' 1. '''string''' __owner__ '''If private room''' 1. '''int''' __number of operators in room__ '''If private room''' 1. Iterate the __number of operators__ '''museekd uses a vector of strings''' 1. '''string''' __operator__ === Server Code 15 === '''Leave Room''' ==== Function Names ==== Museekd: SLeaveRoom [[BR]]Nicotine: '''LeaveRoom''' ==== Description ==== ==== Data Order ==== * Send (leave room) 1. '''string''' __room__ * Receive (left room) 1. '''string''' __room__ === Server Code 16 === '''A User Joined a Room ''' ==== Function Names ==== Museekd: SUserJoinedRoom [[BR]]Nicotine: '''UserJoinedRoom''' ==== Description ==== ==== Data Order ==== * Send * ''No Message'' * Receive 1. '''string''' __room__ 1. '''string''' __username__ 1. '''int''' __status__ 1. '''int''' __avgspeed__ 1. '''off_t''' __downloadnum__ 1. '''int''' __files__ 1. '''int''' __dirs__ 1. '''int''' __slotsfree__ 1. '''string''' __countrycode___ '''Uppercase country code''' === Server Code 17 === '''A User Left a Room''' ==== Function Names ==== Museekd: SUserLeftRoom [[BR]]Nicotine: '''UserLeftRoom''' ==== Description ==== A user (not you) left a room you are in. ==== Data Order ==== * Send * ''No Message'' * Receive 1. '''string''' __room__ 1. '''string''' __username__ === Server Code 18 === '''Connect To Peer''' ==== Function Names ==== Museekd: SConnectToPeer [[BR]]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: [wiki:SoulseekProtocol#PeerConnectionMessageOrder Peer Connection Message Order] ==== Data Order ==== * Send 1. '''uint32''' __token__ 1. '''string''' __username__ 1. '''string''' __type__ ''Connection Type (P, F or D)'' * Receive 1. '''string''' __username__ 1. '''string''' __type__ ''Connection Type (P, F or D)'' 1. '''ip''' __ip__ 1. '''int''' __port__ 1. '''uint32''' __token__ ''Use this token for [wiki:SoulseekProtocol#PeerCode0 Pierce Firewall]'' 1. '''bool''' __privileged__ === Server Code 22 === '''Private Messages''' ==== Function Names ==== Museekd: SPrivateMessage [[BR]]Nicotine: '''MessageUser''' ==== Description ==== ==== Data Order ==== * Send 1. '''string''' __username__ 1. '''string''' __message__ * Receive 1. '''int''' __ID__ 1. '''int''' __timestamp__ 1. '''string''' __username__ 1. '''string''' __message__ 1. '''bool''' __isAdmin__ '''1 if sent by server, elsenot present''' === Server Code 23 === '''Acknowledge Private Message''' ==== Function Names ==== Museekd: SAckPrivateMessage [[BR]]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 1. '''int''' __message ID__ * Receive * ''No Message'' === Server Code 26 === '''File Search''' Museekd: SFileSearch [[BR]]Nicotine: '''FileSearch''' ==== Description ==== The ticket is a random number generated by the client and used to track the search results. ==== Data Order ==== * Send 1. '''int''' __ticket__ 1. '''string''' __search query__ * Receive ''search request from another user'' 1. '''string''' __username__ 1. '''int''' __ticket__ 1. '''string''' __search query__ === Server Code 28 === '''Set Online Status''' ==== Function Names ==== Museekd: SSetStatus [[BR]]Nicotine: '''SetStatus''' ==== Description ==== Status is a way to define whether you're available or busy. ''1 = Away and 2 = Online'' ==== Data Order ==== * Send 1. '''int''' __status__ * Receive * ''No Message'' === Server Code 32 === '''Ping''' ==== Function Names ==== Museekd: SPing [[BR]]Nicotine: '''ServerPing''' ==== Description ==== Test if server responds ==== Data Order ==== * Send * Empty Message * Receive * Empty Message === Server Code 34 === '''Send Speed''' ==== Function Names ==== Museekd: SSendSpeed [[BR]]Nicotine: '''SendSpeed''' ==== Description ==== '''DEPRECIATED''' ==== Data Order ==== * Send ''average transfer speed'' 1. '''string''' __username__ 1. '''int''' __speed__ * Receive * ''No Message'' === Server Code 35 === '''Shared Folders & Files''' ==== Function Names ==== Museekd: SSharedFoldersFiles [[BR]]Nicotine: '''SharedFoldersFiles''' ==== Description ==== ==== Data Order ==== * Send 1. '''int''' __dirs__ 1. '''int''' __files__ * Receive * ''No Message'' === Server Code 36 === '''Get User Stats''' Museekd: SGetUserStats [[BR]]Nicotine: '''GetUserStats''' '''This is deprecated, see SAddUser.''' ==== Data Order ==== * Send 1. '''string''' __username__ * Receive 1. '''string''' __username__ 1. '''int''' __avgspeed__ 1. '''off_t''' __downloadnum__ 1. '''int''' __files__ 1. '''int''' __dirs__ === Server Code 40 === '''Queued Downloads''' ==== Function Names ==== Museekd: '''Not implemented''' Nicotine: '''QueuedDownloads''' ==== Description ==== '''DEPRECIATED''' ==== Data Order ==== * Send * ''No Message'' * Receive 1. '''string''' __username__ 1. '''bool''' __slotsfree__ ''Can immediately download'' === Server Code 41 === '''Kicked from Server''' ==== Function Names ==== Museekd: SKicked [[BR]]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 [[BR]]Nicotine: '''UserSearch''' ==== Description ==== Search a specific user's shares ==== Data Order ==== * Send 1. '''string''' __username__ 1. '''int''' __ticket__ 1. '''string''' __search query__ * Receive * ''No Message'' === Server Code 51 === '''Add Liked Interest ''' ==== Function Names ==== Museekd: SInterestAdd [[BR]]Nicotine: '''AddThingILike''' ==== Description ==== ==== Data Order ==== * Send 1. '''string''' __item__ * Receive * ''No Message'' === Server Code 52 === '''Remove Liked Interest ''' ==== Function Names ==== Museekd: SInterestRemove [[BR]]Nicotine: '''RemoveThingILike''' ==== Description ==== ==== Data Order ==== * Send 1. '''string''' __item__ * Receive * ''No Message'' === Server Code 54 === '''Get Recommendations''' ==== Function Names ==== Museekd: SGetRecommendations [[BR]]Nicotine: '''Recommendations''' ==== Description ==== List of recommendations and a number for each ==== Data Order ==== * Send * Empty Message * Receive 1. '''int''' __number of total recommendations__ 1. Iterate for __number of total recommendations__ 1. '''string''' __recommendation__ 1. '''int''' __number of recommendations this recommendation has__ 1. '''int''' __number of total unrecommendations__ 1. Iterate for __number of total unrecommendations__ 1. '''string''' __unrecommendation__ 1. '''int''' __number of unrecommendations this unrecommendation has (negative)__ === Server Code 56 === '''Get Global Recommendations''' ==== Function Names ==== Museekd: SGetGlobalRecommendations [[BR]]Nicotine: '''GlobalRecommendations''' ==== Description ==== List of recommendations and a number for each ==== Data Order ==== * Send * Empty Message * Receive 1. '''int''' __number of total recommendations__ 1. Iterate for __number of total recommendations__ 1. '''string''' __recommendation__ 1. '''int''' __number of recommendations this recommendation has__ 1. '''int''' __number of total unrecommendations__ 1. Iterate for __number of total unrecommendations__ 1. '''string''' __unrecommendation__ 1. '''int''' __number of unrecommendations this unrecommendation has (negative)__ === Server Code 57 === '''Get User Interests''' ==== Function Names ==== Museekd: [[BR]]Nicotine: '''UserInterests''' ==== Description ==== Get a User's Liked and Hated Interests ==== Data Order ==== * Send 1. '''string''' __username__ * Receive 1. '''string''' __username__ 1. '''int''' __number of liked interests__ 1. Iterate for __number of liked interests__ 1. '''string''' __interest__ 1. '''int''' __number of hated interests__ 1. Iterate for __number of hated interests__ 1. '''string''' __interest__ === Server Code 64 === '''Room List''' ==== Function Names ==== Museekd: SRoomList [[BR]]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 1. '''int''' __number of rooms__ 1. Iterate for __number of rooms__ 1. '''string''' __room__ 1. '''int''' __number of rooms__ 1. Iterate for __number of rooms__ 1. '''int''' __number of users in room__ 1. '''int''' __number of owned private rooms__ 1. Iterate for __number of owned private rooms__ 1. '''string''' __owned private room__ 1. '''int''' __number of owned private rooms__ 1. Iterate for __number of owned private rooms__ 1. '''int''' __number of users in owned private room__ 1. '''int''' __number of private rooms (except owned)__ 1. Iterate for __number of private rooms (except owned)__ 1. '''string''' __private room__ 1. '''int''' __number of private rooms (except owned)__ 1. 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__ 1. Iterate for __number of operated private rooms__ 1. '''string''' __operated private room__ === Server Code 65 === '''Exact File Search''' ==== Function Names ==== Museekd: SExactFileSearch [[BR]]Nicotine: '''ExactFileSearch''' ==== Description ==== SEEMS BROKEN (no results even with official client) ==== Data Order ==== * Send * ''No Message'' * Receive 1. '''string''' __username__ 1. '''uint32''' __ticket__ 1. '''string''' __filename__ 1. '''string''' __path__ 1. '''off_t''' __filesize__ 1. '''uint32''' __checkum__ === Server Code 66 === '''Global / Admin Message''' ==== Function Names ==== Museekd: SGlobalMessage [[BR]]Nicotine: '''AdminMessage''' ==== Description ==== Admins send this message to all users ==== Data Order ==== * Send * ''No Message'' * Receive 1. '''string''' __message__ === Server Code 69 === '''Privileged Users''' ==== Function Names ==== Museekd: SPrivilegedUsers [[BR]]Nicotine: '''PrivilegedUsers''' ==== Description ==== List of privileged users ==== Data Order ==== * Send * ''No Message'' * Receive 1. '''int''' __number of users__ 1. Iterate __number of users__ 1. '''string''' __user__ === Server Code 71 === '''Have No Parents''' ==== Function Names ==== Museekd: SHaveNoParents [[BR]]Nicotine: '''HaveNoParent''' ==== Description ==== ==== Data Order ==== * Send 1. '''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 1. '''ip''' __ip__ * Receive * ''No Message'' === Server Code 83 === '''ParentMinSpeed''' ==== Description ==== Unknown Purpose ==== Data Order ==== * Send * ''No Message'' * Receive 1. '''int''' __number__ === Server Code 84 === '''ParentSpeedRatio'' ==== Description ==== Unknown Purpose. ==== Data Order ==== * Send * ''No Message'' * Receive 1. '''int''' __number__ === Server Code 86 === '''Parent Inactivity Timeout''' ==== Description ==== '''DEPRECIATED''' ==== Function Names ==== Museekd: SParentInactivityTimeout [[BR]]Nicotine: '''ParentInactivityTimeout''' ==== Description ==== ==== Data Order ==== * Send * ''No Message'' * Receive 1. '''int''' __number__ === Server Code 87 === '''Search Inactivity Timeout''' ==== Description ==== '''DEPRECIATED''' ==== Function Names ==== Museekd: SSearchInactivityTimeout [[BR]]Nicotine: '''SearchInactivityTimeout''' ==== Description ==== ==== Data Order ==== * Send * ''No Message'' * Receive 1. '''int''' __number__ === Server Code 88 === '''Minimum Parents In Cache''' ==== Description ==== '''DEPRECIATED''' ==== Function Names ==== Museekd: SMinParentsInCache [[BR]]Nicotine: '''MinParentsInCache''' ==== Description ==== ==== Data Order ==== * Send * ''No Message'' * Receive 1. '''int''' __number__ === Server Code 90 === '''Distributed Alive Interval''' ==== Description ==== '''DEPRECIATED''' ==== Function Names ==== Museekd: SDistribAliveInterval [[BR]]Nicotine: '''DistribAliveInterval''' ==== Description ==== ==== Data Order ==== * Send * ''No Message'' * Receive 1. '''int''' __number__ === Server Code 91 === '''Add Privileged User''' ==== Function Names ==== Museekd: SAddPrivileged [[BR]]Nicotine: '''AddToPrivileged''' ==== Description ==== Add a new privileged user to your list of global privileged users ==== Data Order ==== * Send * ''No Message'' * Receive 1. '''string''' __user__ === Server Code 92 === '''Check Privileges''' ==== Function Names ==== Museekd: SCheckPrivileges [[BR]]Nicotine: CheckPrivileges ==== Description ==== ==== Data Order ==== * Send * Empty Message * Receive 1. '''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 1. '''uint8''' __distributed code (DSearchRequest)__ 1. '''int''' __unknown__ 1. '''string''' __username__ 1. '''int''' __token__ 1. '''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 1. '''bool''' __accept__ * Receive * No Message === Server Code 102 === '''Net Info''' ==== Description ==== ==== Function Names ==== Museekd: SNetInfo [[BR]]Nicotine: '''NetInfo''' ==== Data Order ==== * Send * Empty Message * Receive ''list of search parents'' 1. '''int''' __number of parents__ 1. Iterate for __number of parents__ 1. '''string''' __user__ 1. '''IP''' __IP address__ 1. '''int''' __port__ === Server Code 103 === '''Wishlist Search''' ==== Function Names ==== Museekd: SWishlistSearch [[BR]]Nicotine: '''WishlistSearch''' ==== Description ==== ==== Data Order ==== * Send 1. '''int''' __ticket__ 1. '''string''' __search query__ * Receive * ''No Message'' === Server Code 104 === '''Wishlist Interval''' ==== Function Names ==== Museekd: SWishlistInterval [[BR]]Nicotine: '''WishlistInterval''' ==== Description ==== ==== Data Order ==== * Send * ''No Message'' * Receive 1. '''int''' __interval__ === Server Code 110 === '''Get Similar Users''' ==== Function Names ==== Museekd: SGetSimilarUsers [[BR]]Nicotine: '''SimilarUsers''' ==== Description ==== ==== Data Order ==== * Send * Empty Message * Receive 1. '''int''' __number of users__ 1. Iterate for __number of user__ 1. '''string''' __user__ 1. '''int''' __status__ === Server Code 111 === '''Get Item Recommendations''' ==== Function Names ==== Museekd: SGetItemRecommendations [[BR]]Nicotine: '''ItemRecommendations''' ==== Description ==== ==== Data Order ==== * Send 1. '''string''' __item__ * Receive 1. '''string''' __item__ 1. '''int''' __number of recommendations____ 1. Iterate for __number of recommendations____ 1. '''string''' __recommendation__ 1. '''int''' __number of recommendations for this recommendation (can be negative)__ === Server Code 112 === '''Get Item Similar Users''' ==== Function Names ==== Museekd: SGetItemSimilarUsers [[BR]]Nicotine: '''ItemSimilarUsers''' ==== Description ==== ==== Data Order ==== * Send 1. '''string''' __item__ * Receive 1. '''string''' __item__ 1. '''int''' __number of users__ 1. Iterate for __number of user__ 1. '''string''' __user__ 1. '''int''' 0 === Server Code 113 === '''Room Tickers''' ==== Function Names ==== Museekd: SRoomTickers [[BR]]Nicotine: '''RoomTickerState''' ==== Description ==== ==== Data Order ==== * Send * ''No Message'' * Receive 1. '''string''' __room__ 1. '''int''' __number of users__ 1. Iterate for __number of user__ 1. '''string''' __user__ 1. '''string''' __tickers__ === Server Code 114 === '''Room Ticker Add''' ==== Function Names ==== Museekd: SRoomTickerAdd [[BR]]Nicotine: '''RoomTickerAdd''' ==== Description ==== ==== Data Order ==== * Send * ''No Message'' * Receive 1. '''string''' __room__ 1. '''string''' __user__ 1. '''string''' __ticker__ === Server Code 115 === '''Room Ticker Remove''' ==== Function Names ==== Museekd: SRoomTickerRemove [[BR]]Nicotine: '''RoomTickerRemove''' ==== Description ==== ==== Data Order ==== * Send * ''No Message'' * Receive 1. '''string''' __room__ 1. '''string''' __user__ === Server Code 116 === '''Set Room Ticker''' ==== Function Names ==== Museekd: SSetRoomTicker [[BR]]Nicotine: '''RoomTickerSet''' ==== Description ==== ==== Data Order ==== * Send 1. '''string''' __room__ 1. '''string''' __ticker__ * Receive * ''No Message'' === Server Code 117 === '''Add Hated Interest''' ==== Function Names ==== Museekd: SInterestHatedAdd [[BR]]Nicotine: '''AddThingIHate''' ==== Description ==== ==== Data Order ==== * Send 1. '''string''' __item__ * Receive * ''No Message'' === Server Code 118 === '''Remove Hated Interest''' ==== Function Names ==== Museekd: SInterestHatedRemove [[BR]]Nicotine: '''RemoveThingIHate''' ==== Description ==== ==== Data Order ==== * Send 1. '''string''' __item__ * Receive * ''No Message'' === Server Code 120 === '''Room Search''' ==== Function Names ==== Museekd: SRoomSearch [[BR]]Nicotine: '''RoomSearch''' ==== Description ==== ==== Data Order ==== * Send 1. '''string''' __room__ 1. '''string''' __ticket__ 1. '''string''' __search query__ * Receive * ''No Message'' === Server Code 121 === '''Send Upload Speed''' ==== Function Names ==== Museekd: '''SSendUploadSpeed''' [[BR]]Nicotine: '''SendUploadSpeed''' ==== Description ==== ==== Data Order ==== * Send ''average upload transfer speed'' 1. '''int''' __speed__ * Receive * ''No Message'' === Server Code 122 === '''A user's Soulseek Privileges''' ==== Function Names ==== Museekd: '''SUserPrivileges''' [[BR]]Nicotine: '''Not implemented''' ==== Description ==== ==== Data Order ==== * Send 1. '''string''' __user__ * Receive 1. '''string''' __user__ 1. '''char''' __privileged__ (boolean internal to museekd) === Server Code 123 === '''Give Soulseek Privileges to user''' ==== Function Names ==== Museekd: SGivePrivileges [[BR]]Nicotine: '''GivePrivileges''' ==== Description ==== ==== Data Order ==== * Send 1. '''string''' __user__ 1. '''int''' __days__ * Receive * ''No Message'' === Server Code 124 === '''Server sends us a Notification about our privileges''' ==== Function Names ==== [[BR]]Nicotine: '''NotifyPrivileges''' ==== Description ==== ==== Data Order ==== * Send 1. '''int''' __token__ 1. '''string''' __user__ * Receive * ''No Message'' === Server Code 125 === '''Acknowledge Privilege Notification''' ==== Function Names ==== [[BR]]Nicotine: '''AckNotifyPrivileges''' ==== Description ==== ==== Data Order ==== * Send * ''No Message'' * Receive 1. '''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 1. '''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 1. '''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 1. '''int''' __child_depth__ * Receive * ''No Message'' === Server Code 133 === '''Private Room Users that we can (dis)op/dismember''' ==== Description ==== We get this when we've created a private room ==== Function Names ==== Museekd: SPrivRoomAlterableMembers[[BR]] Nicotine: PrivateRoomUsers ==== Data Order ==== * Send 1. ''No Message'' * Receive 1. '''string''' __room__ 1. '''int''' __number of users__ 1. Iterate for __number of users__ 1. '''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: SPrivRoomAddUser[[BR]] Nicotine: PrivateRoomAddUser ==== Data Order ==== * Send 1. '''string''' __room__ 1. '''string''' __user__ * Receive 1. '''string''' __room__ 1. '''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: SPrivRoomRemoveUser[[BR]] Nicotine: PrivateRoomRemoveUser ==== Data Order ==== * Send 1. '''string''' __room__ 1. '''string''' __user__ * Receive 1. '''string''' __room__ 1. '''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: SPrivRoomDismember[[BR]] Nicotine: PrivateRoomDismember ==== Data Order ==== * Send 1. '''string''' __room__ * Not received === Server Code 137 === '''Private Room Drop Ownership''' ==== Description ==== We do this to stop owning a private room. ==== Function Names ==== Museekd: SPrivRoomDisown[[BR]] Nicotine: PrivateRoomDisown ==== Data Order ==== * Send 1. '''string''' __room__ * Not received === Server Code 138 === '''Private Room Unknown''' ==== Description ==== Undocumented ==== Function Names ==== Museekd: SPrivRoomUnknown138[[BR]] Nicotine: PrivateRoomSomething ==== Data Order ==== * Send 1. '''string''' __room__ * Receive 1. '''string''' __room__ === Server Code 139 === '''Private Room Added''' ==== Description ==== We receive this when we are added to a private room. ==== Function Names ==== Museekd: SPrivRoomAdded[[BR]] Nicotine: PrivateRoomAdded ==== Data Order ==== * Not sent * Receive 1. '''string''' __room__ === Server Code 140 === '''Private Room Removed''' ==== Description ==== We receive this when we are removed from a private room. ==== Function Names ==== Museekd: SPrivRoomRemoved[[BR]] Nicotine: PrivateRoomRemoved ==== Data Order ==== * Not sent * Receive 1. '''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: SPrivRoomToggle[[BR]] Nicotine: PrivateRoomToggle ==== Data Order ==== * Send 1. '''bool''' __enable__ * Receive 1. '''bool''' __enable__ === Server Code 142 === '''New Password''' ==== Description ==== Send the new password. Server sent it back to confirm. ==== Function Names ==== Museekd: SNewPassword[[BR]] Nicotine: Unimplemented ==== Data Order ==== * Send 1. '''string''' __pass__ * Receive 1. '''string''' __pass__ === Server Code 143 === '''Private Room Add Operator''' ==== Description ==== We send this to add private room operator abilities to a user ==== Function Names ==== Museekd: SPrivRoomAddOperator[[BR]] Nicotine: PrivateRoomAddOperator ==== Data Order ==== * Send 1. '''string''' __room__ 1. '''string''' __operator__ * Receive 1. '''string''' __room__ 1. '''string''' __operator__ === Server Code 144 === '''Private Room Remove Operator''' ==== Description ==== We send this to remove privateroom operator abilities from a user ==== Function Names ==== Museekd: SPrivRoomRemoveOperator[[BR]] Nicotine: PrivateRoomRemoveOperator ==== Data Order ==== * Send 1. '''string''' __room__ 1. '''string''' __operator__ * Receive 1. '''string''' __room__ 1. '''string''' __operator__ === Server Code 145 === '''Private Room Operator Added''' ==== Description ==== We receive this when given private room operator abilities ==== Function Names ==== Museekd: SPrivRoomOperatorAdded[[BR]] Nicotine: PrivateRoomOperatorAdded ==== Data Order ==== * Not sent * Receive 1. '''string''' __room__ === Server Code 146 === '''Private Room Operator Removed''' ==== Description ==== We receive this when privateroom operator abilities are removed ==== Function Names ==== Museekd: SPrivRoomOperatorRemoved[[BR]] Nicotine: PrivateRoomOperatorRemoved ==== Data Order ==== * Not sent * Receive 1. '''string''' __room__ === Server Code 148 === '''Private Room Operators''' ==== Description ==== List of operators of a specific room, that we can disop. ==== Function Names ==== Museekd: SPrivRoomAlterableOperators[[BR]] Nicotine: PrivateRoomOwned ==== Data Order ==== * Not sent * Receive 1. '''string''' __room__ 1. '''int''' __number of operators in room__ 1. Iterate the __number of operators__ '''museekd uses a vector of strings''' 1. '''string''' __operator__ === Server Code 149 === '''Message Users''' ==== Description ==== Sends a broadcast private message to the given list of users. ==== Function Names ==== Museekd: SMessageUsers[[BR]] Nicotine: Unimplemented ==== Data Order ==== * Send 1. '''int''' __number of users__ 1. Iterate the __number of users__ '''museekd uses a vector of strings''' 1. '''string''' __user__ 1. '''string''' __message__ === Server Code 150 === '''Ask Public Chat''' ==== Description ==== Ask the server to send us public chat. ==== Function Names ==== Museekd: SAskPublicChat[[BR]] Nicotine: Unimplemented ==== Data Order ==== * Send * Empty Message === Server Code 151 === '''Stop Public Chat''' ==== Description ==== Ask the server to stop sending us public chat. ==== Function Names ==== Museekd: SStopPublicChat[[BR]] Nicotine: Unimplemented ==== Data Order ==== * Send * Empty Message === Server Code 152 === '''Private Chat''' ==== Description ==== Public chat sent by the server (ie every single line written in every public room). ==== Function Names ==== Museekd: SPublicChat[[BR]] Nicotine: Unimplemented ==== Data Order ==== * Receive 1. '''string''' __room__ 1. '''string''' __user__ 1. '''string''' __message__ === Server Code 1001 === '''Cannot Connect''' ==== Function Names ==== Museekd: '''SCannotConnect''' [[BR]]Nicotine: '''CantConnectToPeer''' ==== Description ==== See also: [wiki:SoulseekProtocol#PeerConnectionMessageOrder Peer Connection Message Order] ==== Data Order ==== * Send ''to the Server if we cannot connect to a peer.'' 1. '''int''' __token__ 1. '''string''' __user__ * Receive ''this response means we are both firewalled or otherwise unable to connect to each other.'' 1. '''int''' __token__ 1. '''string''' __user__ = Peer Messages = [wiki:SoulseekProtocol#ServerMessages Server Messages] [wiki:SoulseekProtocol#PeerMessages Peer Messages] [wiki:SoulseekProtocol#DistributedMessages Distributed Messages] [wiki:SoulseekProtocol#MuseekDataTypes 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. Since museekd 0.2, they are defined in museekd/peermessages.h. ==== The Peer Init Message format ==== || Message Length || Code || Message Contents || || 4 Bytes || 1 Byte || ... || ==== Peer Init Message Index ==== || Code || Message || || 0 || [wiki:SoulseekProtocol#PeerCode0 Pierce Firewall] || || 1 || [wiki:SoulseekProtocol#PeerCode1 Peer Init] || === Peer Connection Message Order === 1. User A sends a [wiki:SoulseekProtocol#PeerCode1 Peer Init] to User B (Fails: socket cannot connect) 2. User A sends [wiki:SoulseekProtocol#ServerCode18 ConnectToPeer] to the Server with a unique token 3. The Server sends a [wiki:SoulseekProtocol#ServerCode18 ConnectToPeer] response to User B with the same token 4. User B sends a [wiki:SoulseekProtocol#PeerCode0 Pierce Firewall] to User A with the same token (if this fails connections are doomed) 5. User B sends a [wiki:SoulseekProtocol#ServerCode1001 Cannot Connect] to the Server 6. The Server sends a [wiki:SoulseekProtocol#ServerCode1001 Cannot Connect] response to User A === Peer Code 0 === '''Pierce Firewall''' ==== Function Names ==== ==== Description ==== See also: [wiki:SoulseekProtocol#PeerConnectionMessageOrder 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: [wiki:SoulseekProtocol#PeerConnectionMessageOrder 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 || [wiki:SoulseekProtocol#PeerCode4 Shares Request] || || 5 || [wiki:SoulseekProtocol#PeerCode5 Shares Reply] || || 8 || [wiki:SoulseekProtocol#PeerCode8 Search Request] || || 9 || [wiki:SoulseekProtocol#PeerCode9 Search Reply] || || 15 || [wiki:SoulseekProtocol#PeerCode15 Info Request ] || || 16 || [wiki:SoulseekProtocol#PeerCode16 Info Reply ] || || 36 || [wiki:SoulseekProtocol#PeerCode36 Folder Contents Request] || || 37 || [wiki:SoulseekProtocol#PeerCode37 Folder Contents Reply ] || || 40 || [wiki:SoulseekProtocol#PeerCode40 Transfer Request ] || || 41 || [wiki:SoulseekProtocol#PeerCode41a Upload Reply ] || || 41 || [wiki:SoulseekProtocol#PeerCode41b Download Reply ] || || 41 || [wiki:SoulseekProtocol#PeerCode41c Transfer Reply ] || || 42 || [wiki:SoulseekProtocol#PeerCode42 Upload Placehold] || || 43 || [wiki:SoulseekProtocol#PeerCode43 Queue Download ] || || 44 || [wiki:SoulseekProtocol#PeerCode44 Upload Queue Notification ] || || 46 || [wiki:SoulseekProtocol#PeerCode46 Upload Failed ] || || 50 || [wiki:SoulseekProtocol#PeerCode50 Queue Failed ] || || 51 || [wiki:SoulseekProtocol#PeerCode51 Place In Queue Request ] || || 52 || [wiki:SoulseekProtocol#PeerCode52 Upload Queue Notification ] || === Peer Code 4 === '''Shares Request''' ==== Function Names ==== Museekd: PSharesRequest [[BR]]Nicotine: '''GetShareFileList''' ==== Description ==== ==== Data Order ==== * Send * Empty Message * Receive * Empty Message === Peer Code 5 === '''Shares Reply''' ==== Function Names ==== Museekd: PSharesReply [[BR]]Nicotine: '''SharedFileList''' ==== Description ==== ==== Data Order ==== * Send ''shares database'' 1. Iterate thru shares database 1. '''data''' * Receive ''shares database'' 1. decompress 1. '''int''' __number of directories__ 1. Iterate __number of directories__ 1. '''string''' __directory__ 1. '''int''' __number of files__ 1. Iterate __number of files__ 1. '''char''' ??? (unused) 1. '''string''' __filename__ 1. '''off_t''' __size__ ''File size'' 1. '''string''' __ext__ ''Extentsion'' 1. '''int''' __number of attributes__ 1. Iterate __number of attributes__ 1. '''int''' __place in attributes__ (unused by museekd) 1. '''int''' __attribute__ === Peer Code 8 === '''Search Request''' Museekd: PSearchRequest [[BR]]Nicotine: '''FileSearchRequest''' ==== Description ==== ==== Data Order ==== * Send 1. '''int''' __ticket__ 1. '''string''' __query__ * Receive 1. '''int''' __ticket__ 1. '''string''' __query__ === Peer Code 9 === '''Search Reply''' ==== Function Names ==== Museekd: PSearchReply [[BR]]Nicotine: '''FileSearchResult''' ==== Description ==== ==== Data Order ==== * Send 1. '''string''' __user__ 1. '''int''' __ticket__ 1. '''int''' __results size__ ''number of results'' 1. Iterate for number of results 1. '''uchar''' 1 1. '''string''' __filename__ 1. '''int''' __size__ 1. '''string''' __ext__ 1. '''int''' __attribute size__ 1. Iterate __number of attributes__ 1. '''int''' __place in attributes__ 1. '''int''' __attribute__ 1. '''bool''' __slotfree__ 1. '''int''' __avgspeed__ 1. '''off_t''' __queue length__ * Receive 1. decompress 1. '''string''' __user__ 1. '''int''' __ticket__ 1. '''int''' __results size__ __number of results__ 1. Iterate for __number of results__ museekd pop buffer 1. '''string''' __filename__ 1. '''off_t''' __size__ 1. '''string''' __ext__ 1. '''int''' __number of attributes__ 1. Iterate __number of attributes__ 1. '''int''' __place in attributes__ 1. '''int''' __attribute__ 1. '''bool''' __slotfree__ 1. '''int''' __avgspeed__ 1. '''off_t''' __queue length__ === Peer Code 15 === '''Info Request''' ==== Function Names ==== Museekd: PInfoRequest [[BR]]Nicotine: '''UserInfoRequest''' ==== Description ==== ==== Data Order ==== * Send * Empty Message * Receive * Empty Message === Peer Code 16 === '''Info Reply''' ==== Function Names ==== Museekd: PInfoReply [[BR]]Nicotine: '''UserInfoReply''' ==== Description ==== ==== Data Order ==== * Send description, picture, totalupl, queuesize, slotfree 1. '''string''' __description__ 1. Check contents of __picture__ * If __picture__ is not empty 1. '''bool''' __has_picture__ 1 1. '''string''' __picture__ * If __picture__ is empty 1. '''bool''' __has_picture__ 0 1. '''uint''' __totalupl__ 1. '''uint''' __queuesize__ 1. '''bool''' __slotsfree__ ''Can immediately upload'' * Receive 1. '''string''' __description__ 1. '''char''' __has_picture__ 1. Check contents of __has_picture__ 1. If __has_picture__ is not empty 1. '''string''' __picture__ 1. '''int''' __totalupl__ 1. '''int''' __queuesize__ 1. '''bool''' __slotsfree__ ''Can immediately download'' === Peer Code 36 === '''Folder Contents Request''' ==== Function Names ==== Museekd: PFolderContentsRequest [[BR]]Nicotine: '''FolderContentsRequest''' ==== Description ==== ==== Data Order ==== * Send 1. '''int''' __number of files in directory__ 1. Iterate __number of files in directory__ 1. '''string''' __file__ * Receive 1. '''int''' __number of files in directory__ 1. Iterate __number of files in directory__ 1. '''string''' __file__ === Peer Code 37 === '''Folder Contents Reply''' ==== Function Names ==== Museekd: PFolderContentsReply [[BR]]Nicotine: '''FolderContentsResponse''' ==== Description ==== ==== Data Order ==== * Send 1. '''int''' __number of folders__ 1. Iterate for __number of folders__ 1. '''string''' __dir__ 1. '''int''' __number of files__ 1. Iterate __number of files__ 1. '''char''' __true__ 1. '''string''' __file__ 1. '''off_t''' __size__ 1. '''string''' __ext__ Extension 1. '''int''' __number of attributes__ 1. '''int''' __attribute number__ 1. '''int''' __attribute__ * Receive 1. decompress 1. '''int''' __number of folders__ 1. Iterate for __number of folders__ 1. '''string''' __dir__ 1. '''int''' __number of files__ 1. Iterate __number of files__ 1. '''char''' __???__ (unused) 1. '''string''' __file__ 1. '''off_t''' __size__ 1. '''string''' __ext__ Extension 1. '''int''' __number of attributes__ 1. '''int''' __attribute number__ 1. '''int''' __attribute__ === Peer Code 40 === '''Transfer Request''' ==== Function Names ==== Museekd: PTransferRequest [[BR]]Nicotine: '''TransferRequest''' ==== Description ==== ==== Data Order ==== * Send 1. '''int''' __direction__ 1. '''int''' __ticket__ 1. '''string''' __filename__ 1. Check contents of __direction__ * '''off_t''' __filesize__ ''if direction == 1'' * Receive 1. '''int''' __direction__ 1. '''int''' __ticket__ 1. '''string''' __filename__ 1. Check contents of __direction__ * '''off_t''' __filesize__ ''if direction == 1'' === Peer Code 41 a === '''Upload Reply''' ==== Function Names ==== Museekd: PUploadReply [[BR]]Nicotine: '''TransferResponse''' ==== Description ==== ==== Data Order ==== * Send 1. '''string''' __ticket__ 1. '''uchar''' __allowed__ 1. 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 [[BR]]Nicotine: '''TransferResponse''' ==== Description ==== ==== Data Order ==== * Send 1. '''string''' __ticket__ 1. '''uchar''' __allowed__ 1. Check contents of __allowed__ * '''string''' __reason__ ''if allowed == 0'' * Receive * ''No Message'' === Peer Code 41 c === '''Transfer Reply''' ==== Function Names ==== Museekd: PTransferReply [[BR]]Nicotine: '''TransferResponse''' ==== Description ==== ==== Data Order ==== * Send * ''No Message'' * Receive 1. '''string''' __ticket__ 1. '''char''' __allowed__ == 1 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 [[BR]]Nicotine: '''PlaceholdUpload''' ==== Description ==== '''DEPRECIATED''' ==== Data Order ==== * Send 1. '''string''' __filename__ * Receive 1. '''string''' __filename__ === Peer Code 43 === '''Queue Upload or Download''' ==== Function Names ==== Museekd: PQueueDownload [[BR]]Nicotine: '''QueueUpload''' ==== Description ==== ==== Data Order ==== * Send 1. '''string''' __filename__ * Receive 1. '''string''' __filename__ === Peer Code 44 === '''Place In Queue Reply''' Museekd: PPlaceInQueueReply [[[BR]]Nicotine: '''PlaceInQueue''' ==== Description ==== ==== Data Order ==== * Send 1. '''string''' __filename__ 1. '''string''' __place__ * Receive 1. '''string''' __filename__ 1. '''string''' __place__ === Peer Code 46 === '''Upload Failed''' ==== Function Names ==== Museekd: PUploadFailed [[BR]]Nicotine: '''UploadFailed''' ==== Description ==== ==== Data Order ==== * Send 1. '''string''' __filename__ * Receive 1. '''string''' __filename__ === Peer Code 50 === '''Queue Failed''' ==== Function Names ==== Museekd: PQueueFailed [[BR]]Nicotine: '''QueueFailed''' ==== Description ==== ==== Data Order ==== * Send 1. '''string''' __filename__ 1. '''string''' __reason__ * Receive 1. '''string''' __filename__ 1. '''string''' __reason__ === Peer Code 51 === '''Place In Queue Request''' ==== Function Names ==== Museekd: PPlaceInQueueRequest [[BR]]Nicotine: '''PlaceInQueueRequest''' ==== Description ==== ==== Data Order ==== * Send 1. '''string''' __filename__ * Receive 1. '''string''' __filename__ === Peer Code 52 === '''Upload Queue Notification''' ==== Function Names ==== Museekd: PUploadQueueNotification [[BR]]Nicotine: '''Not implemented''' ==== Description ==== ==== Data Order ==== * Send * ''Empty Message'' * Receive * ''Empty Message'' == Distributed Messages == [wiki:SoulseekProtocol#ServerMessages Server Messages] [wiki:SoulseekProtocol#PeerMessages Peer Messages] [wiki:SoulseekProtocol#DistributedMessages Distributed Messages] [wiki:SoulseekProtocol#MuseekDataTypes 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. Since museekd 0.2, they are defined in museekd/distributedmessages.h. ==== The Message format ==== || Message Length || Code || Message Contents || || 4 Bytes || 1 Byte || ... || ==== Message Index ==== || Code || Message || || 0 || [wiki:SoulseekProtocol#DistributedCode0 Ping] || || 3 || [wiki:SoulseekProtocol#DistributedCode3 Search Request] || || 4 || [wiki:SoulseekProtocol#DistributedCode4 Branch Level] || || 5 || [wiki:SoulseekProtocol#DistributedCode5 Branch Root] || || 7 || [wiki:SoulseekProtocol#DistributedCode7 Child Depth] || === Distributed Code 0 === '''Ping''' ==== Description ==== Send it every 60 sec. ==== Function Names ==== Museekd: '''DPing''' [[BR]]Nicotine: '''DistribAlive''' ==== Data Order ==== * Send * ''Empty Message'' * Receive 1. '''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''' [[BR]]Nicotine: '''DistribSearch''' ==== Data Order ==== * Send 1. '''uint32''' __unknown__ 1. '''string''' __user__ 1. '''uint32''' __ticket__ 1. '''string''' __query__ * Receive 1. '''uint32''' __unknown__ 1. '''string''' __user__ 1. '''uint32''' __ticket__ 1. '''string''' __query__ === Distributed Code 4 === '''Branch Level''' ==== Description ==== See SBranchLevel ==== Function Names ==== Museekd: '''DBranchLevel''' [[BR]]Nicotine: '''DistribUnknown''' ==== Data Order ==== * Send 1. '''uint32''' __branch_level__ * Receive 1. '''uint32''' __branch_level__ === Distributed Code 5 === '''Branch Root''' ==== Description ==== See SBranchRoot ==== Function Names ==== Museekd: '''DBranchRoot''' ==== Data Order ==== * Send 1. '''string''' __branch_root__ * Receive 1. '''string''' __branch_root__ === Distributed Code 7 === '''Branch Level''' ==== Description ==== See SChildDepth ==== Function Names ==== Museekd: '''DChildDepth''' ==== Data Order ==== * Send 1. '''uint32''' __child_depth__ * Receive 1. '''uint32''' __child_depth__ == Museek Data Types == [wiki:SoulseekProtocol#ServerMessages Server Messages] [wiki:SoulseekProtocol#PeerMessages Peer Messages] [wiki:SoulseekProtocol#DistributedMessages Distributed Messages] [wiki:SoulseekProtocol#MuseekDataTypes Museek Data Types] === !StringMap === * std::map === !StringList === * std::vector === WStringList === * std::vector WStringList === WTickers === * std::map === Recommendations, !SimilarUsers, !RoomList === * std::map === !NetInfo === * std::map > === !UserData === 1. '''uint32''' __status__ ''Online Status'' 1. '''uint32''' __avgspeed__ ''Average Speed'' 1. '''uint32''' __downloadnum__ ''Number of downloaded files'' 1. '''uint32''' __files__ ''Files shared'' 1. '''uint32''' __dirs__ ''Directories shared'' 1. '''bool''' __slotsfree__ ''Slots free'' === !RoomData === * std::map === Folder === * std::map === Shares === * std::map === WFolder === * std::map === Folders === * std::map === WShares === * std::map === WFolders === * std::map === off_t === * Packed as a 64bit Integer