1# Soulseek Protocol Documentation
2
3Last updated on November 2, 2021
4
5Since the official Soulseek client and server is proprietary software, this documentation has been compiled thanks to years of reverse engineering efforts. To preserve the health of the Soulseek network, please do not modify the protocol in ways that negatively impact the network.
6
7If you find any inconsistencies or errors in the documentation, please report them.
8
9## Sections
10
11- [Packing](#packing)
12- [Constants](#constants)
13- [Server Messages](#server-messages)
14- [Peer Init Messages](#peer-init-messages)
15- [Peer Messages](#peer-messages)
16- [File Messages](#file-messages)
17- [Distributed Messages](#distributed-messages)
18- [Museek Data Types](#museek-data-types)
19
20# Packing
21
22### String
23
24| Length of String | String |
25| ---------------- | ------ |
26| 4 Byte           | String |
27
28### Integer
29
30| Number |
31| ------ |
32| 4 Byte |
33
34### Large Integer
35
36| Number |
37| ------ |
38| 8 Byte |
39
40### Bool
41
42| Character |
43| --------- |
44| 1 Byte    |
45
46# Constants
47
48### Connection Types
49
50| Type | Connection          |
51| ---- | ------------------- |
52| P    | Peer To Peer        |
53| F    | File Transfer       |
54| D    | Distributed Network |
55
56### Status Codes
57
58| Code | Status  |
59| ---- | ------- |
60| -1   | Unknown |
61| 0    | Offline |
62| 1    | Away    |
63| 2    | Online  |
64
65### Transfer Direction
66
67| Code | Type     |
68| ---- | -------- |
69| 0    | Download |
70| 1    | Upload   |
71
72# Server Messages
73
74| Send           | Receive             |
75| -------------- | ------------------- |
76| Send to Server | Receive from Server |
77
78These messages are used by clients to interface with the server.
79Internal Server messages are spooky and not understood, since the OSS
80crowd doesn't have access to its source code. If you want a Soulseek
81server, check out
82[Soulfind](https://github.com/seeschloss/soulfind).
83Soulfind is obviously not the exact same the official Soulseek server,
84but it handles the protocol well enough (and can be modified).
85
86In museekd 0.1.13, these messages are sent and received in
87Museek/ServerConnection.cc and defined in Museek/ServerMessages.hh.
88Since museekd 0.2, they are defined in museekd/servermessages.h.
89
90In Nicotine, these messages are matched to their message number in
91slskproto.py in the SlskProtoThread function, defined in slskmessages.py
92and callbacks for the messages are set in pynicotine.py.
93
94#### Server Message Format
95
96| Message Length | Code    | Message Contents |
97| -------------- | ------- | ---------------- |
98| 4 Bytes        | 4 Bytes | ...              |
99
100#### Message Index
101
102| Code | Message                                           | Status     |
103| ---- | ------------------------------------------------- | ---------- |
104| 1    | [Login](#server-code-1)                           |            |
105| 2    | [Set Listen Port](#server-code-2)                 |            |
106| 3    | [Get Peer Address](#server-code-3)                |            |
107| 5    | [Add User](#server-code-5)                        |            |
108| 6    | [Remove User](#server-code-6)                     |            |
109| 7    | [Get Status](#server-code-7)                      |            |
110| 13   | [Say in Chat Room](#server-code-13)               |            |
111| 14   | [Join Room](#server-code-14)                      |            |
112| 15   | [Leave Room](#server-code-15)                     |            |
113| 16   | [User Joined Room](#server-code-16)               |            |
114| 17   | [User Left Room](#server-code-17)                 |            |
115| 18   | [Connect To Peer](#server-code-18)                |            |
116| 22   | [Private Messages](#server-code-22)               |            |
117| 23   | [Acknowledge Private Message](#server-code-23)    |            |
118| 26   | [File Search](#server-code-26)                    |            |
119| 28   | [Set Online Status](#server-code-28)              |            |
120| 32   | [Ping](#server-code-32)                           | Deprecated |
121| 33   | [Send Connect Token](#server-code-33)             | Obsolete   |
122| 34   | [Send Download Speed](#server-code-34)            | Obsolete   |
123| 35   | [Shared Folders & Files](#server-code-35)         |            |
124| 36   | [Get User Stats](#server-code-36)                 |            |
125| 40   | [Queued Downloads](#server-code-40)               | Obsolete   |
126| 41   | [Kicked from Server](#server-code-41)             |            |
127| 42   | [User Search](#server-code-42)                    |            |
128| 51   | [Interest Add](#server-code-51)                   | Deprecated |
129| 52   | [Interest Remove](#server-code-52)                | Deprecated |
130| 54   | [Get Recommendations](#server-code-54)            | Deprecated |
131| 56   | [Get Global Recommendations](#server-code-56)     | Deprecated |
132| 57   | [Get User Interests](#server-code-57)             | Deprecated |
133| 58   | [Admin Command](#server-code-58)                  | Obsolete   |
134| 60   | [Place In Line Response](#server-code-60)         | Obsolete   |
135| 62   | [Room Added](#server-code-62)                     | Obsolete   |
136| 63   | [Room Removed](#server-code-63)                   | Obsolete   |
137| 64   | [Room List](#server-code-64)                      |            |
138| 65   | [Exact File Search](#server-code-65)              | Obsolete   |
139| 66   | [Global/Admin Message](#server-code-66)           |            |
140| 67   | [Global User List](#server-code-67)               | Obsolete   |
141| 68   | [Tunneled Message](#server-code-68)               | Obsolete   |
142| 69   | [Privileged Users](#server-code-69)               |            |
143| 71   | [Have No Parents](#server-code-71)                |            |
144| 73   | [Parent's IP](#server-code-73)                    | Deprecated |
145| 83   | [Parent Min Speed](#server-code-83)               |            |
146| 84   | [Parent Speed Ratio](#server-code-84)             |            |
147| 86   | [Parent Inactivity Timeout](#server-code-86)      | Obsolete   |
148| 87   | [Search Inactivity Timeout](#server-code-87)      | Obsolete   |
149| 88   | [Minimum Parents In Cache](#server-code-88)       | Obsolete   |
150| 90   | [Distributed Alive Interval](#server-code-90)     | Obsolete   |
151| 91   | [Add Privileged User](#server-code-91)            | Obsolete   |
152| 92   | [Check Privileges](#server-code-92)               |            |
153| 93   | [Embedded Message](#server-code-93)               |            |
154| 100  | [Accept Children](#server-code-100)               |            |
155| 102  | [Possible Parents](#server-code-102)              |            |
156| 103  | [Wishlist Search](#server-code-103)               |            |
157| 104  | [Wishlist Interval](#server-code-104)             |            |
158| 110  | [Get Similar Users](#server-code-110)             | Deprecated |
159| 111  | [Get Item Recommendations](#server-code-111)      | Deprecated |
160| 112  | [Get Item Similar Users](#server-code-112)        | Deprecated |
161| 113  | [Room Tickers](#server-code-113)                  |            |
162| 114  | [Room Ticker Add](#server-code-114)               |            |
163| 115  | [Room Ticker Remove](#server-code-115)            |            |
164| 116  | [Set Room Ticker](#server-code-116)               |            |
165| 117  | [Hated Interest Add](#server-code-117)            | Deprecated |
166| 118  | [Hated Interest Remove](#server-code-118)         | Deprecated |
167| 120  | [Room Search](#server-code-120)                   |            |
168| 121  | [Send Upload Speed](#server-code-121)             |            |
169| 122  | [User Privileges](#server-code-122)               | Deprecated |
170| 123  | [Give Privileges](#server-code-123)               |            |
171| 124  | [Notify Privileges](#server-code-124)             | Deprecated |
172| 125  | [Acknowledge Notify Privileges](#server-code-125) | Deprecated |
173| 126  | [Branch Level](#server-code-126)                  |            |
174| 127  | [Branch Root](#server-code-127)                   |            |
175| 129  | [Child Depth](#server-code-129)                   |            |
176| 130  | [Reset Distributed](#server-code-130)             |            |
177| 133  | [Private Room Users](#server-code-133)            |            |
178| 134  | [Private Room Add User](#server-code-134)         |            |
179| 135  | [Private Room Remove User](#server-code-135)      |            |
180| 136  | [Private Room Drop Membership](#server-code-136)  |            |
181| 137  | [Private Room Drop Ownership](#server-code-137)   |            |
182| 138  | [Private Room Unknown](#server-code-138)          | Obsolete   |
183| 139  | [Private Room Added](#server-code-139)            |            |
184| 140  | [Private Room Removed](#server-code-140)          |            |
185| 141  | [Private Room Toggle](#server-code-141)           |            |
186| 142  | [New Password](#server-code-142)                  |            |
187| 143  | [Private Room Add Operator](#server-code-143)     |            |
188| 144  | [Private Room Remove Operator](#server-code-144)  |            |
189| 145  | [Private Room Operator Added](#server-code-145)   |            |
190| 146  | [Private Room Operator Removed](#server-code-146) |            |
191| 148  | [Private Room Owned](#server-code-148)            |            |
192| 149  | [Message Users](#server-code-149)                 |            |
193| 150  | [Ask Public Chat](#server-code-150)               | Deprecated |
194| 151  | [Stop Public Chat](#server-code-151)              | Deprecated |
195| 152  | [Public Chat Message](#server-code-152)           | Deprecated |
196| 153  | [Related Searches](#server-code-153)              | Obsolete   |
197| 1001 | [Can't Connect To Peer](#server-code-1001)        |            |
198| 1003 | [Can't Create Room](#server-code-1003)            |            |
199
200### Server Code 1
201
202**Login**
203
204#### Function Names
205
206Museekd: SLogin
207Nicotine: Login
208
209#### Description
210
211Send your username, password, and client version.
212
213##### Sending Login Example
214
215| Description | Message Length | Message Code | Username Length | Username                | Password Length | Password                |
216| ----------- | -------------- | ------------ | --------------- | ----------------------- | --------------- | ----------------------- |
217| Human       | 72             | 1            | 8               | username                | 8               | password                |
218| 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 |
219
220*Message, continued*
221
222| Description | Version     | Length      | Hash                                                                                            | Minor Version |
223| ----------- | ----------- | ----------- | ----------------------------------------------------------------------------------------------- | ------------- |
224| Human       | 160         | 32          | d51c9a7e9353746a6020f9602d452929                                                                | 1             |
225| Hex         | a0 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   |
226
227*Message as a Hex Stream* **48 00 00 00 01 00 00 00 08 00 00 00 75 73 65
22872 6e 61 6d 65 08 00 00 00 70 61 73 73 77 6f 72 64 a0 00 00 00 20 00 00
22900 64 35 31 63 39 61 37 65 39 33 35 33 37 34 36 61 36 30 32 30 66 39 36
23030 32 64 34 35 32 39 32 39 01 00 00 00**
231
232#### Data Order
233
234  - Send Login
235    1.  **string** <ins>username</ins>
236    2.  **string** <ins>password</ins> **A non-empty
237        string is required**
238    3.  **uint** <ins>version number</ins> *178*
239        for Museek+ *160* for Nicotine+
240    4.  **string** <ins>MD5 hex digest of
241        concatenated username & password</ins>
242    5.  **uint** <ins>minor version</ins> Minor
243        version (0x13000000 for 157 ns 13e, 0x11000000 for 157 ns 13c)
244
245<!-- end list -->
246
247  - Receive Login Success
248    1.  **bool** <ins>success</ins> 1
249    2.  **string** <ins>greet</ins> A MOTD string
250    3.  **uint** <ins>Your IP Address</ins>
251    4.  **string** <ins>MD5 hex digest of the
252        password string</ins> *Windows Soulseek uses this hash to
253        determine if it's connected to the official server*
254
255<!-- end list -->
256
257  - Receive Login Failure
258    1.  **bool** <ins>failure</ins> *0*
259    2.  **string** <ins>reason</ins> Almost always:
260        *Bad Password*; sometimes it's a banned message or another
261        error.
262
263### Server Code 2
264
265**Set Listen Port**
266
267#### Function Names
268
269Museekd: SSetListenPort
270Nicotine: SetWaitPort
271
272#### Description
273
274We send this to the server to indicate the port number that we listen on (2234 by default).
275
276If this value is set to zero, or the message is not sent upon login (which defaults the listen port to 0), remote clients handling a `ConnectToPeer` message (code 18) will fail to properly purge the request.  Confirmed in Soulseek Qt 2020.3.12, but probably impacts most or all other versions.
277
278#### Data Order
279
280  - Send
281    1.  **uint** <ins>port</ins>
282    2.  **bool** <ins>use obfuscation</ins>
283    3.  **uint** <ins>obfuscated port</ins>
284  - Receive
285      - *No Message*
286
287### Server Code 3
288
289**Get Peer Address**
290
291#### Function Names
292
293Museekd: SGetPeerAddress
294Nicotine: GetPeerAddress
295
296#### Description
297
298We send this to the server to ask for a peer's address (IP address and port), given the peer's username.
299
300#### Data Order
301
302  - Send
303    1.  **string** <ins>username</ins>
304  - Receive
305    1.  **string** <ins>username</ins>
306    2.  **ip** <ins>ip</ins>
307    3.  **uint** <ins>port</ins>
308    4.  **bool** <ins>use obfuscation</ins>
309    5.  **uint** <ins>obfuscated port</ins>
310
311### Server Code 5
312
313**Add User**
314
315#### Function Names
316
317Museekd: SAddUser
318Nicotine: AddUser
319
320#### Description
321
322Used 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.
323
324#### Data Order
325
326  - Send
327    1.  **string** <ins>username</ins>
328
329  - Receive
330    1.  **string** <ins>username</ins>
331    2.  **bool** <ins>exists</ins>
332
333    - If <ins>exists</ins> is true
334        1.  **uint** <ins>status</ins> *0 == Offline, 1 == Away; 2 == Online*
335        2.  **uint** <ins>avgspeed</ins>
336        3.  **uint64** <ins>uploadnum</ins>
337        4.  **uint** <ins>files</ins>
338        5.  **uint** <ins>dirs</ins>
339
340        - If <ins>status</ins> is away/online
341            1.  **string** <ins>countrycode</ins> *Uppercase country code*
342
343### Server Code 6
344
345**Remove User**
346
347#### Function Names
348
349Museekd: Unimplemented
350Nicotine: RemoveUser
351
352#### Description
353
354Used when we no longer want to be kept updated about a user's stats.
355
356#### Data Order
357
358  - Send
359    1.  **string** <ins>username</ins>
360  - Receive
361      - *No Message*
362
363### Server Code 7
364
365**Get Status**
366
367#### Function Names
368
369Museekd: SGetStatus
370Nicotine: GetUserStatus
371
372#### Description
373
374The server tells us if a user has gone away or has returned.
375
376#### Data Order
377
378  - Send
379    1.  **string** <ins>username</ins>
380  - Receive
381    1.  **string** <ins>username</ins>
382    2.  **uint** <ins>status</ins> *0 == Offline, 1 == Away; 2 == Online*
383    3.  **bool** <ins>privileged</ins>
384
385### Server Code 13
386
387**Say in Chat Room**
388
389#### Function Names
390
391Museekd: SSayChatroom
392Nicotine: SayChatroom
393
394#### Description
395
396Either we want to say something in the chatroom, or someone else did.
397
398#### Data Order
399
400  - Send
401    1.  **string** <ins>room</ins>
402    2.  **string** <ins>message</ins>
403  - Receive
404    1.  **string** <ins>room</ins>
405    2.  **string** <ins>username</ins>
406    3.  **string** <ins>message</ins>
407
408### Server Code 14
409
410**Join a Room**
411
412#### Function Names
413
414Museekd: SJoinRoom
415Nicotine: JoinRoom
416
417#### Description
418
419We send this message to the server when we want to join a room. If the room doesn't exist, it is created.
420
421Server responds with this message when we join a room. Contains users list with data on everyone.
422
423#### Data Order
424
425  - Send
426    1.  **string** <ins>room</ins>
427    2.  **bool** <ins>private</ins> *If the room doesn't exist, should the new room be private?*
428
429<!-- end list -->
430
431  - Receive
432    1.  **string** <ins>room</ins>
433    2.  **uint** <ins>number of users in room</ins>
434        **For private rooms, also contain owner and operators**
435    3.  Iterate the <ins>number of users</ins>
436        **museekd uses a vector of strings**
437        1.  **string** <ins>username</ins>
438    4.  **uint** <ins>number of userdata</ins>
439    5.  Iterate the <ins>number of users</ins>
440        **museekd uses a vector of userdata**
441        1.  **uint** <ins>status</ins>
442    6.  **uint** <ins>number of userdata</ins>
443    7.  Iterate the userdata **vector of userdata** (and add unpacked data to [User Data](#userdata))
444        1.  **uint** <ins>avgspeed</ins>
445        2.  **uint64** <ins>uploadnum</ins>
446        3.  **uint** <ins>files</ins>
447        4.  **uint** <ins>dirs</ins>
448    8.  **uint** <ins>number of slotsfree</ins>
449    9.  Iterate thru number of slotsfree
450        1.  **uint** <ins>slotsfree</ins>
451    10. **uint** <ins>number of usercountries</ins>
452    11. Iterate thru number of usercountries
453        1.  **string** <ins>countrycode</ins> *Uppercase country code*
454    12. **string** <ins>owner</ins> **If private
455        room**
456    13. **uint** <ins>number of operators in
457        room</ins> **If private room**
458    14. Iterate the <ins>number of operators</ins>
459        **museekd uses a vector of strings**
460        1.  **string** <ins>operator</ins>
461
462### Server Code 15
463
464**Leave Room**
465
466#### Function Names
467
468Museekd: SLeaveRoom
469Nicotine: LeaveRoom
470
471#### Description
472
473We send this to the server when we want to leave a room.
474
475#### Data Order
476
477  - Send
478    1.  **string** <ins>room</ins>
479  - Receive
480    1.  **string** <ins>room</ins>
481
482### Server Code 16
483
484**A User Joined a Room**
485
486#### Function Names
487
488Museekd: SUserJoinedRoom
489Nicotine: UserJoinedRoom
490
491#### Description
492
493The server tells us someone has just joined a room we're in.
494
495#### Data Order
496
497  - Send
498      - *No Message*
499  - Receive
500    1.  **string** <ins>room</ins>
501    2.  **string** <ins>username</ins>
502    3.  **uint** <ins>status</ins>
503    4.  **uint** <ins>avgspeed</ins>
504    5.  **uint64** <ins>uploadnum</ins>
505    6.  **uint** <ins>files</ins>
506    7.  **uint** <ins>dirs</ins>
507    8.  **uint** <ins>slotsfree</ins>
508    9.  **string** <ins>countrycode</ins> *Uppercase country code*
509
510### Server Code 17
511
512**A User Left a Room**
513
514#### Function Names
515
516Museekd: SUserLeftRoom
517Nicotine: UserLeftRoom
518
519#### Description
520
521The server tells us someone has just left a room we're in.
522
523#### Data Order
524
525  - Send
526      - *No Message*
527  - Receive
528    1.  **string** <ins>room</ins>
529    2.  **string** <ins>username</ins>
530
531### Server Code 18
532
533**Connect To Peer**
534
535#### Function Names
536
537Museekd: SConnectToPeer
538Nicotine: ConnectToPeer
539
540#### Description
541
542Either 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).
543
544See also: [Peer
545Connection Message
546Order](#peer-connection-message-order)
547
548#### Data Order
549
550  - Send
551    1.  **uint** <ins>token</ins>
552    2.  **string** <ins>username</ins>
553    3.  **string** <ins>type</ins> *Connection Type (P, F or D)*
554  - Receive
555    1.  **string** <ins>username</ins>
556    2.  **string** <ins>type</ins> *Connection Type (P, F or D)*
557    3.  **ip** <ins>ip</ins>
558    4.  **uint** <ins>port</ins>
559    5.  **uint** <ins>token</ins> *Use this token for [Pierce Firewall](#peer-init-code-0)*
560    6.  **bool** <ins>privileged</ins>
561    7.  **bool** <ins>use obfuscation</ins>
562    8.  **uint** <ins>obfuscated port</ins>
563
564### Server Code 22
565
566**Private Messages**
567
568#### Function Names
569
570Museekd: SPrivateMessage
571Nicotine: MessageUser
572
573#### Description
574
575Chat phrase sent to someone or received by us in private.
576
577#### Data Order
578
579  - Send
580    1.  **string** <ins>username</ins>
581    2.  **string** <ins>message</ins>
582  - Receive
583    1.  **uint** <ins>ID</ins>
584    2.  **uint** <ins>timestamp</ins>
585    3.  **string** <ins>username</ins>
586    4.  **string** <ins>message</ins>
587    5.  **bool** <ins>new message</ins> **1 if message is new, 0 if message is re-sent (e.g. if recipient was offline)**
588
589### Server Code 23
590
591**Acknowledge Private Message**
592
593#### Function Names
594
595Museekd: SAckPrivateMessage
596Nicotine: MessageAcked
597
598#### Description
599
600We 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.
601
602Museekd also resets timestamps to account for server-time bugginess.
603
604#### Data Order
605
606  - Send
607    1.  **uint** <ins>message ID</ins>
608  - Receive
609      - *No Message*
610
611### Server Code 26
612
613**File Search**
614
615#### Function Names
616
617Museekd: SFileSearch
618Nicotine: FileSearch
619
620#### Description
621
622We send this to the server when we search for something. Alternatively, the server sends this message outside the distributed network to tell us that someone is searching for something, currently used for [UserSearch](#server-code-42) and [RoomSearch](#server-code-120) requests.
623
624The ticket/search id is a random number generated by the client and is used to track the search results.
625
626#### Data Order
627
628  - Send
629    1.  **uint** <ins>ticket</ins>
630    2.  **string** <ins>search query</ins>
631  - Receive *search request from another user*
632    1.  **string** <ins>username</ins>
633    2.  **uint** <ins>ticket</ins>
634    3.  **string** <ins>search query</ins>
635
636### Server Code 28
637
638**Set Online Status**
639
640#### Function Names
641
642Museekd: SSetStatus
643Nicotine: SetStatus
644
645#### Description
646
647We send our new status to the server. Status is a way to define whether you're available or busy.
648
649*1 = Away
6502 = Online*
651
652#### Data Order
653
654  - Send
655    1.  **int** <ins>status</ins>
656  - Receive
657      - *No Message*
658
659### Server Code 32
660
661**Ping**
662
663#### Function Names
664
665Museekd: SPing
666Nicotine: ServerPing
667
668#### Description
669
670**DEPRECATED**
671
672We test if the server responds.
673
674#### Data Order
675
676  - Send
677      - Empty Message
678  - Receive
679      - Empty Message
680
681### Server Code 33
682
683**Send Connect Token**
684
685#### Function Names
686
687Museekd: Unimplemented
688Nicotine: SendConnectToken
689
690#### Description
691
692**OBSOLETE, no longer used**
693
694#### Data Order
695
696  - Send
697    1.  **string** <ins>username</ins>
698    2.  **uint** <ins>token</ins>
699  - Receive
700    1.  **string** <ins>username</ins>
701    2.  **uint** <ins>token</ins>
702
703### Server Code 34
704
705**Send Download Speed**
706
707#### Function Names
708
709Museekd: SSendSpeed
710Nicotine: SendDownloadSpeed
711
712#### Description
713
714**OBSOLETE, use [SendUploadSpeed](#server-code-121) server message**
715
716We used to send this after a finished download to let the server update the speed statistics for a user.
717
718#### Data Order
719
720  - Send *average transfer speed*
721    1.  **string** <ins>username</ins>
722    2.  **uint** <ins>speed</ins>
723  - Receive
724      - *No Message*
725
726### Server Code 35
727
728**Shared Folders & Files**
729
730#### Function Names
731
732Museekd: SSharedFoldersFiles
733Nicotine: SharedFoldersFiles
734
735#### Description
736
737We send this to server to indicate the number of folder and files that we share.
738
739#### Data Order
740
741  - Send
742    1.  **uint** <ins>dirs</ins>
743    2.  **uint** <ins>files</ins>
744  - Receive
745      - *No Message*
746
747### Server Code 36
748
749**Get User Stats**
750
751#### Function Names
752
753Museekd: SGetUserStats
754Nicotine: GetUserStats
755
756#### Description
757
758The 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.
759
760#### Data Order
761
762  - Send
763    1.  **string** <ins>username</ins>
764  - Receive
765    1.  **string** <ins>username</ins>
766    2.  **uint** <ins>avgspeed</ins>
767    3.  **uint64** <ins>uploadnum</ins>
768    4.  **uint** <ins>files</ins>
769    5.  **uint** <ins>dirs</ins>
770
771### Server Code 40
772
773**Queued Downloads**
774
775#### Function Names
776
777Museekd: Unimplemented
778Nicotine: QueuedDownloads
779
780#### Description
781
782**OBSOLETE, no longer sent by the server**
783
784The server sends this to indicate if someone has download slots available or not.
785
786#### Data Order
787
788  - Send
789      - *No Message*
790  - Receive
791    1.  **string** <ins>username</ins>
792    2.  **bool** <ins>slotsfree</ins> *Can
793        immediately download*
794
795### Server Code 41
796
797**Kicked from Server**
798
799#### Function Names
800
801Museekd: SKicked
802Nicotine: Relogged
803
804#### Description
805
806The server sends this if someone else logged in under our nickname, and then disconnects us.
807
808#### Data Order
809
810  - Send
811      - *No Message*
812  - Receive
813      - Empty Message
814
815### Server Code 42
816
817**User Search**
818
819#### Function Names
820
821Museekd: SUserSearch
822Nicotine: UserSearch
823
824#### Description
825
826We 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.
827
828#### Data Order
829
830  - Send
831    1.  **string** <ins>username</ins>
832    2.  **uint** <ins>ticket</ins>
833    3.  **string** <ins>search query</ins>
834  - Receive
835      - *No Message*
836
837### Server Code 51
838
839**Add Liked Interest**
840
841#### Function Names
842
843Museekd: SInterestAdd
844Nicotine: AddThingILike
845
846#### Description
847
848**DEPRECATED, used in Soulseek NS but not SoulseekQt**
849
850We send this to the server when we add an item to our likes list.
851
852#### Data Order
853
854  - Send
855    1.  **string** <ins>item</ins>
856  - Receive
857      - *No Message*
858
859### Server Code 52
860
861**Remove Liked Interest**
862
863#### Function Names
864
865Museekd: SInterestRemove
866Nicotine: RemoveThingILike
867
868#### Description
869
870**DEPRECATED, used in Soulseek NS but not SoulseekQt**
871
872We send this to the server when we remove an item from our likes list.
873
874#### Data Order
875
876  - Send
877    1.  **string** <ins>item</ins>
878  - Receive
879      - *No Message*
880
881### Server Code 54
882
883**Get Recommendations**
884
885#### Function Names
886
887Museekd: SGetRecommendations
888Nicotine: Recommendations
889
890#### Description
891
892**DEPRECATED, used in Soulseek NS but not SoulseekQt**
893
894The server sends us a list of personal recommendations and a number for each.
895
896#### Data Order
897
898  - Send
899      - Empty Message
900  - Receive
901    1.  **uint** <ins>number of total
902        recommendations</ins>
903    2.  Iterate for <ins>number of total
904        recommendations</ins>
905        1.  **string** <ins>recommendation</ins>
906        2.  **int** <ins>number of recommendations
907            this recommendation has</ins>
908    3.  **uint** <ins>number of total
909        unrecommendations</ins>
910    4.  Iterate for <ins>number of total
911        unrecommendations</ins>
912        1.  **string** <ins>unrecommendation</ins>
913        2.  **int** <ins>number of unrecommendations
914            this unrecommendation has (negative)</ins>
915
916### Server Code 56
917
918**Get Global Recommendations**
919
920#### Function Names
921
922Museekd: SGetGlobalRecommendations
923Nicotine: GlobalRecommendations
924
925#### Description
926
927**DEPRECATED, used in Soulseek NS but not SoulseekQt**
928
929The server sends us a list of global recommendations and a number for each.
930
931#### Data Order
932
933  - Send
934      - Empty Message
935  - Receive
936    1.  **uint** <ins>number of total
937        recommendations</ins>
938    2.  Iterate for <ins>number of total
939        recommendations</ins>
940        1.  **string** <ins>recommendation</ins>
941        2.  **int** <ins>number of recommendations
942            this recommendation has</ins>
943    3.  **uint** <ins>number of total
944        unrecommendations</ins>
945    4.  Iterate for <ins>number of total
946        unrecommendations</ins>
947        1.  **string** <ins>unrecommendation</ins>
948        2.  **int** <ins>number of unrecommendations
949            this unrecommendation has (negative)</ins>
950
951### Server Code 57
952
953**Get User Interests**
954
955#### Function Names
956
957Museekd: SUserInterests
958Nicotine: UserInterests
959
960#### Description
961
962**DEPRECATED, used in Soulseek NS but not SoulseekQt**
963
964We ask the server for a user's liked and hated interests. The server responds with a list of interests.
965
966#### Data Order
967
968  - Send
969    1.  **string** <ins>username</ins>
970  - Receive
971    1.  **string** <ins>username</ins>
972    2.  **uint** <ins>number of liked interests</ins>
973    3.  Iterate for <ins>number of liked
974        interests</ins>
975        1.  **string** <ins>interest</ins>
976    4.  **uint** <ins>number of hated interests</ins>
977    5.  Iterate for <ins>number of hated
978        interests</ins>
979        1.  **string** <ins>interest</ins>
980
981### Server Code 58
982
983**Admin Command**
984
985#### Function Names
986
987Museekd: Unimplemented
988Nicotine: AdminCommand
989
990#### Description
991
992**OBSOLETE, no longer used since Soulseek stopped supporting third-party servers in 2002**
993
994We send this to the server to run an admin command (e.g. to ban or silence a user) if we have admin status on the server.
995
996#### Data Order
997
998  - Send
999    1.  **string** <ins>command</ins>
1000    2.  **uint** <ins>number of command arguments</ins>
1001    3.  Iterate for <ins>number of command arguments</ins>
1002        1.  **string** <ins>command argument</ins>
1003  - Receive
1004      - *No Message*
1005
1006### Server Code 60
1007
1008**Place In Line Response**
1009
1010#### Description
1011
1012**OBSOLETE, use [PlaceInQueue](#peer-code-44) peer message**
1013
1014The server sends this to indicate change in place in queue while we're waiting for files from another peer.
1015
1016#### Function Names
1017
1018Museekd: Unimplemented
1019Nicotine: PlaceInLineResponse
1020
1021#### Data Order
1022
1023  - Send
1024    1.  **string** <ins>username</ins>
1025    2.  **uint** <ins>req</ins>
1026    3.  **uint** <ins>place</ins>
1027  - Receive
1028    1.  **string** <ins>username</ins>
1029    2.  **uint** <ins>req</ins>
1030    3.  **uint** <ins>place</ins>
1031
1032### Server Code 62
1033
1034**Room Added**
1035
1036#### Description
1037
1038**OBSOLETE, no longer sent by the server**
1039
1040The server tells us a new room has been added.
1041
1042#### Function Names
1043
1044Museekd: Unimplemented
1045Nicotine: RoomAdded
1046
1047#### Data Order
1048
1049  - Send
1050      - *No Message*
1051  - Receive
1052    1.  **string** <ins>room</ins>
1053
1054### Server Code 63
1055
1056**Room Removed**
1057
1058#### Description
1059
1060**OBSOLETE, no longer sent by the server**
1061
1062The server tells us a room has been removed.
1063
1064#### Function Names
1065
1066Museekd: Unimplemented
1067Nicotine: RoomRemoved
1068
1069#### Data Order
1070
1071  - Send
1072      - *No Message*
1073  - Receive
1074    1.  **string** <ins>room</ins>
1075
1076### Server Code 64
1077
1078**Room List**
1079
1080#### Function Names
1081
1082Museekd: SRoomList
1083Nicotine: RoomList
1084
1085#### Description
1086
1087The server tells us a list of rooms and the number of users in them. When connecting to the server, the server only sends us rooms with at least 5 users. A few select rooms are also excluded, such as nicotine and The Lobby. Requesting the room list yields a response containing the missing rooms.
1088
1089#### Data Order
1090
1091  - Send
1092      - Empty Message
1093  - Receive
1094    1.  **uint** <ins>number of rooms</ins>
1095    2.  Iterate for <ins>number of rooms</ins>
1096        1.  **string** <ins>room</ins>
1097    3.  **uint** <ins>number of rooms</ins>
1098    4.  Iterate for <ins>number of rooms</ins>
1099        1.  **uint** <ins>number of users in
1100            room</ins>
1101
1102<!-- end list -->
1103
11041.  **uint** <ins>number of owned private rooms</ins>
11052.  Iterate for <ins>number of owned private
1106    rooms</ins>
1107    1.  **string** <ins>owned private room</ins>
11083.  **uint** <ins>number of owned private rooms</ins>
11094.  Iterate for <ins>number of owned private
1110    rooms</ins>
1111    1.  **uint** <ins>number of users in owned private
1112        room</ins>
1113
1114<!-- end list -->
1115
11161.  **uint** <ins>number of private rooms (except
1117    owned)</ins>
11182.  Iterate for <ins>number of private rooms (except
1119    owned)</ins>
1120    1.  **string** <ins>private room</ins>
11213.  **uint** <ins>number of private rooms (except
1122    owned)</ins>
11234.  Iterate for <ins>number of private rooms (except
1124    owned)</ins>
1125    1.  **uint** <ins>number of users in private rooms
1126        (except owned)</ins>
1127
1128<!-- end list -->
1129
11301.  **uint** <ins>number of operated private
1131    rooms</ins>
11322.  Iterate for <ins>number of operated private
1133    rooms</ins>
1134    1.  **string** <ins>operated private room</ins>
1135
1136### Server Code 65
1137
1138**Exact File Search**
1139
1140#### Function Names
1141
1142Museekd: SExactFileSearch
1143Nicotine: ExactFileSearch
1144
1145#### Description
1146
1147**OBSOLETE, no results even with official client**
1148
1149We send this to search for an exact file name and folder, to find other sources.
1150
1151#### Data Order
1152
1153  - Send
1154    1.  **uint** <ins>token</ins>
1155    2.  **string** <ins>filename</ins>
1156    3.  **string** <ins>path</ins>
1157    4.  **uint64** <ins>filesize</ins>
1158    5.  **uint** <ins>checksum</ins>
1159  - Receive
1160    1.  **string** <ins>username</ins>
1161    2.  **uint** <ins>token</ins>
1162    3.  **string** <ins>filename</ins>
1163    4.  **string** <ins>path</ins>
1164    5.  **uint64** <ins>filesize</ins>
1165    6.  **uint** <ins>checksum</ins>
1166
1167### Server Code 66
1168
1169**Global / Admin Message**
1170
1171#### Function Names
1172
1173Museekd: SGlobalMessage
1174Nicotine: AdminMessage
1175
1176#### Description
1177
1178A global message from the server admin has arrived.
1179
1180#### Data Order
1181
1182  - Send
1183      - *No Message*
1184  - Receive
1185    1.  **string** <ins>message</ins>
1186
1187### Server Code 67
1188
1189**Global User List**
1190
1191#### Function Names
1192
1193Museekd: Unimplemented
1194Nicotine: GlobalUserList
1195
1196#### Description
1197
1198**OBSOLETE, no longer used**
1199
1200We send this to get a global list of all users online.
1201
1202#### Data Order
1203
1204  - Send
1205      - Empty Message
1206  - Receive
1207    1.  **uint** <ins>number of users in room</ins>
1208    2.  Iterate the <ins>number of users</ins>
1209        1.  **string** <ins>username</ins>
1210    3.  **uint** <ins>number of userdata</ins>
1211    4.  Iterate the <ins>number of users</ins>
1212        1.  **uint** <ins>status</ins>
1213    5.  **uint** <ins>number of userdata</ins>
1214    6.  Iterate the <ins>userdata</ins>
1215        1.  **uint** <ins>avgspeed</ins>
1216        2.  **uint64** <ins>uploadnum</ins>
1217        3.  **uint** <ins>files</ins>
1218        4.  **uint** <ins>dirs</ins>
1219    7.  **uint** <ins>number of slotsfree</ins>
1220    8.  Iterate thru number of slotsfree
1221        1.  **uint** <ins>slotsfree</ins>
1222    9. **uint** <ins>number of usercountries</ins>
1223    10. Iterate thru number of usercountries
1224        1.  **string** <ins>countrycode</ins> *Uppercase country code*
1225
1226### Server Code 68
1227
1228**Tunneled Message**
1229
1230#### Function Names
1231
1232Museekd: Unimplemented
1233Nicotine: TunneledMessage
1234
1235#### Description
1236
1237**OBSOLETE, no longer used**
1238
1239Server message for tunneling a chat message.
1240
1241#### Data Order
1242
1243  - Send
1244    1.  **string** <ins>username</ins>
1245    2.  **uint** <ins>token</ins>
1246    3.  **uint** <ins>code</ins>
1247    4.  **string** <ins>message</ins>
1248  - Receive
1249    1.  **string** <ins>username</ins>
1250    2.  **uint** <ins>code</ins>
1251    3.  **uint** <ins>token</ins>
1252    4.  **ip** <ins>ip</ins>
1253    5.  **uint** <ins>port</ins>
1254    6.  **string** <ins>message</ins>
1255
1256### Server Code 69
1257
1258**Privileged Users**
1259
1260#### Function Names
1261
1262Museekd: SPrivilegedUsers
1263Nicotine: PrivilegedUsers
1264
1265#### Description
1266
1267The server sends us a list of privileged users, a.k.a. users who have donated.
1268
1269#### Data Order
1270
1271  - Send
1272      - *No Message*
1273  - Receive
1274    1.  **uint** <ins>number of users</ins>
1275    2.  Iterate <ins>number of users</ins>
1276        1.  **string** <ins>username</ins>
1277
1278### Server Code 71
1279
1280**Have No Parents**
1281
1282#### Function Names
1283
1284Museekd: SHaveNoParents
1285Nicotine: HaveNoParent
1286
1287#### Description
1288
1289We 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 possible parents to connect to. If no candidates are found, no such message is sent by the server, and we eventually become a branch root.
1290
1291#### Data Order
1292
1293  - Send
1294    1.  **bool** <ins>have parents</ins>
1295  - Receive
1296      - *No Message*
1297
1298### Server Code 73
1299
1300**Parent's IP**
1301
1302#### Function Names
1303
1304Museekd: SParentIP
1305Nicotine: SearchParent
1306
1307#### Description
1308
1309**DEPRECATED, sent by Soulseek NS but not SoulseekQt**
1310
1311We send the IP address of our parent to the server.
1312
1313#### Data Order
1314
1315  - Send
1316    1.  **ip** <ins>ip</ins>
1317  - Receive
1318      - *No Message*
1319
1320### Server Code 83
1321
1322**Parent Min Speed**
1323
1324#### Description
1325
1326The server informs us about the minimum upload speed required to become a parent in the distributed network.
1327
1328#### Function Names
1329
1330Museekd: SParentMinSpeed
1331Nicotine: ParentMinSpeed
1332
1333#### Data Order
1334
1335  - Send
1336      - *No Message*
1337  - Receive
1338    1.  **uint** <ins>speed</ins>
1339
1340### Server Code 84
1341
1342**Parent Speed Ratio**
1343
1344#### Description
1345
1346The server sends us a speed ratio determining the number of children we can have in the distributed network. The maximum number of children is our upload speed divided by the speed ratio.
1347
1348#### Function Names
1349
1350Museekd: SParentSpeedRatio
1351Nicotine: ParentSpeedRatio
1352
1353#### Data Order
1354
1355  - Send
1356      - *No Message*
1357  - Receive
1358    1.  **uint** <ins>ratio</ins>
1359
1360### Server Code 86
1361
1362**Parent Inactivity Timeout**
1363
1364#### Description
1365
1366**OBSOLETE, no longer sent by the server**
1367
1368#### Function Names
1369
1370Museekd: SParentInactivityTimeout
1371Nicotine: ParentInactivityTimeout
1372
1373#### Data Order
1374
1375  - Send
1376      - *No Message*
1377  - Receive
1378    1.  **uint** <ins>number</ins>
1379
1380### Server Code 87
1381
1382**Search Inactivity Timeout**
1383
1384#### Description
1385
1386**OBSOLETE, no longer sent by the server**
1387
1388#### Function Names
1389
1390Museekd: SSearchInactivityTimeout
1391Nicotine: SearchInactivityTimeout
1392
1393#### Data Order
1394
1395  - Send
1396      - *No Message*
1397  - Receive
1398    1.  **uint** <ins>number</ins>
1399
1400### Server Code 88
1401
1402**Minimum Parents In Cache**
1403
1404#### Description
1405
1406**OBSOLETE, no longer sent by the server**
1407
1408#### Function Names
1409
1410Museekd: SMinParentsInCache
1411Nicotine: MinParentsInCache
1412
1413#### Description
1414
1415#### Data Order
1416
1417  - Send
1418      - *No Message*
1419  - Receive
1420    1.  **uint** <ins>number</ins>
1421
1422### Server Code 90
1423
1424**Distributed Alive Interval**
1425
1426#### Description
1427
1428**OBSOLETE, no longer sent by the server**
1429
1430#### Function Names
1431
1432Museekd: SDistribAliveInterval
1433Nicotine: DistribAliveInterval
1434
1435#### Description
1436
1437#### Data Order
1438
1439  - Send
1440      - *No Message*
1441  - Receive
1442    1.  **uint** <ins>number</ins>
1443
1444### Server Code 91
1445
1446**Add Privileged User**
1447
1448#### Function Names
1449
1450Museekd: SAddPrivileged
1451Nicotine: AddToPrivileged
1452
1453#### Description
1454
1455**OBSOLETE, no longer sent by the server**
1456
1457The server sends us the username of a new privileged user, which we add to our list of global privileged users.
1458
1459#### Data Order
1460
1461  - Send
1462      - *No Message*
1463  - Receive
1464    1.  **string** <ins>username</ins>
1465
1466### Server Code 92
1467
1468**Check Privileges**
1469
1470#### Function Names
1471
1472Museekd: SCheckPrivileges
1473Nicotine: CheckPrivileges
1474
1475#### Description
1476
1477We ask the server how much time we have left of our privileges. The server responds with the remaining time, in seconds.
1478
1479#### Data Order
1480
1481  - Send
1482      - Empty Message
1483  - Receive
1484    1.  **uint** <ins>time left</ins>
1485
1486### Server Code 93
1487
1488**Embedded Message**
1489
1490#### Description
1491
1492The server sends us an embedded distributed message. The only type of distributed message sent at present is [DistribSearch](#distributed-code-3) (distributed code 3). If we receive such a message, we are a branch root in the distributed network, and we distribute the embedded message (not the unpacked distributed message) to our child peers.
1493
1494#### Function Names
1495
1496Museekd: SSearchRequest
1497Nicotine: EmbeddedMessage
1498
1499#### Data Order
1500
1501  - Send
1502      - *No Message*
1503  - Receive
1504    1.  **uchar** <ins>distributed code</ins>
1505    2.  **bytes** <ins>distributed message</ins> *Raw message associated with distributed code*
1506
1507### Server Code 100
1508
1509**Accept Children**
1510
1511#### Description
1512
1513We tell the server if we want to accept child nodes.
1514
1515#### Function Names
1516
1517Museekd: SAcceptChildren
1518Nicotine: AcceptChildren (not yet used)
1519
1520#### Data Order
1521
1522  - Send
1523    1.  **bool** <ins>accept</ins>
1524  - Receive
1525      - *No Message*
1526
1527### Server Code 102
1528
1529**Possible Parents**
1530
1531#### Description
1532
1533The server send us a list of max 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.
1534
1535The received list always contains users whose upload speed is higher than our own. If we have the highest upload speed on the server, we become a branch root, and start receiving [SearchRequest](#server-code-93) messages directly from the server.
1536
1537#### Function Names
1538
1539Museekd: SNetInfo
1540Nicotine: PossibleParents
1541
1542#### Data Order
1543
1544  - Send
1545      - *No Message*
1546  - Receive *list of search parents*
1547    1.  **uint** <ins>number of parents</ins>
1548    2.  Iterate for <ins>number of parents</ins>
1549        1.  **string** <ins>username</ins>
1550        2.  **ip** <ins>ip</ins>
1551        3.  **uint** <ins>port</ins>
1552
1553### Server Code 103
1554
1555**Wishlist Search**
1556
1557#### Function Names
1558
1559Museekd: SWishlistSearch
1560Nicotine: WishlistSearch
1561
1562#### Description
1563
1564#### Data Order
1565
1566  - Send
1567    1.  **uint** <ins>ticket</ins>
1568    2.  **string** <ins>search query</ins>
1569  - Receive
1570      - *No Message*
1571
1572### Server Code 104
1573
1574**Wishlist Interval**
1575
1576#### Function Names
1577
1578Museekd: SWishlistInterval
1579Nicotine: WishlistInterval
1580
1581#### Description
1582
1583#### Data Order
1584
1585  - Send
1586      - *No Message*
1587  - Receive
1588    1.  **uint** <ins>interval</ins>
1589
1590### Server Code 110
1591
1592**Get Similar Users**
1593
1594#### Function Names
1595
1596Museekd: SGetSimilarUsers
1597Nicotine: SimilarUsers
1598
1599#### Description
1600
1601**DEPRECATED, used in Soulseek NS but not SoulseekQt**
1602
1603The server sends us a list of similar users related to our interests.
1604
1605#### Data Order
1606
1607  - Send
1608      - Empty Message
1609  - Receive
1610    1.  **uint** <ins>number of users</ins>
1611    2.  Iterate for <ins>number of user</ins>
1612        1.  **string** <ins>username</ins>
1613        2.  **uint** <ins>status</ins>
1614
1615### Server Code 111
1616
1617**Get Item Recommendations**
1618
1619#### Function Names
1620
1621Museekd: SGetItemRecommendations
1622Nicotine: ItemRecommendations
1623
1624#### Description
1625
1626**DEPRECATED, used in Soulseek NS but not SoulseekQt**
1627
1628The 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.
1629
1630#### Data Order
1631
1632  - Send
1633    1.  **string** <ins>item</ins>
1634  - Receive
1635    1.  **string** <ins>item</ins>
1636    2.  **uint** <ins>number of
1637        recommendations</ins><ins> </ins>
1638    3.  Iterate for <ins>number of
1639        recommendations</ins><ins> </ins>
1640        1.  **string** <ins>recommendation</ins>
1641        2.  **uint** <ins>number of recommendations
1642            for this recommendation (can be negative)</ins>
1643
1644### Server Code 112
1645
1646**Get Item Similar Users**
1647
1648#### Function Names
1649
1650Museekd: SGetItemSimilarUsers
1651Nicotine: ItemSimilarUsers
1652
1653#### Description
1654
1655**DEPRECATED, used in Soulseek NS but not SoulseekQt**
1656
1657The 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.
1658
1659#### Data Order
1660
1661  - Send
1662    1.  **string** <ins>item</ins>
1663  - Receive
1664    1.  **string** <ins>item</ins>
1665    2.  **uint** <ins>number of users</ins>
1666    3.  Iterate for <ins>number of user</ins>
1667        1.  **string** <ins>username</ins>
1668
1669### Server Code 113
1670
1671**Room Tickers**
1672
1673#### Function Names
1674
1675Museekd: SRoomTickers
1676Nicotine: RoomTickerState
1677
1678#### Description
1679
1680The server returns a list of tickers in a chat room.
1681
1682Tickers are customizable, user-specific messages that appear on chat room walls.
1683
1684#### Data Order
1685
1686  - Send
1687      - *No Message*
1688  - Receive
1689    1.  **string** <ins>room</ins>
1690    2.  **uint** <ins>number of users</ins>
1691    3.  Iterate for <ins>number of user</ins>
1692        1.  **string** <ins>username</ins>
1693        2.  **string** <ins>tickers</ins>
1694
1695### Server Code 114
1696
1697**Room Ticker Add**
1698
1699#### Function Names
1700
1701Museekd: SRoomTickerAdd
1702Nicotine: RoomTickerAdd
1703
1704#### Description
1705
1706The server sends us a new ticker that was added to a chat room.
1707
1708Tickers are customizable, user-specific messages that appear on chat room walls.
1709
1710#### Data Order
1711
1712  - Send
1713      - *No Message*
1714  - Receive
1715    1.  **string** <ins>room</ins>
1716    2.  **string** <ins>username</ins>
1717    3.  **string** <ins>ticker</ins>
1718
1719### Server Code 115
1720
1721**Room Ticker Remove**
1722
1723#### Function Names
1724
1725Museekd: SRoomTickerRemove
1726Nicotine: RoomTickerRemove
1727
1728#### Description
1729
1730The server informs us that a ticker was removed from a chat room.
1731
1732Tickers are customizable, user-specific messages that appear on chat room walls.
1733
1734#### Data Order
1735
1736  - Send
1737      - *No Message*
1738  - Receive
1739    1.  **string** <ins>room</ins>
1740    2.  **string** <ins>username</ins>
1741
1742### Server Code 116
1743
1744**Set Room Ticker**
1745
1746#### Function Names
1747
1748Museekd: SSetRoomTicker
1749Nicotine: RoomTickerSet
1750
1751#### Description
1752
1753We send this to the server when we change our own ticker in a chat room. Sending an empty ticker string removes any existing ticker in the room.
1754
1755Tickers are customizable, user-specific messages that appear on chat room walls.
1756
1757#### Data Order
1758
1759  - Send
1760    1.  **string** <ins>room</ins>
1761    2.  **string** <ins>ticker</ins>
1762  - Receive
1763      - *No Message*
1764
1765### Server Code 117
1766
1767**Add Hated Interest**
1768
1769#### Function Names
1770
1771Museekd: SInterestHatedAdd
1772Nicotine: AddThingIHate
1773
1774#### Description
1775
1776**DEPRECATED, used in Soulseek NS but not SoulseekQt**
1777
1778We send this to the server when we add an item to our hate list.
1779
1780#### Data Order
1781
1782  - Send
1783    1.  **string** <ins>item</ins>
1784  - Receive
1785      - *No Message*
1786
1787### Server Code 118
1788
1789**Remove Hated Interest**
1790
1791#### Function Names
1792
1793Museekd: SInterestHatedRemove
1794Nicotine: RemoveThingIHate
1795
1796#### Description
1797
1798**DEPRECATED, used in Soulseek NS but not SoulseekQt**
1799
1800We send this to the server when we remove an item from our hate list.
1801
1802#### Data Order
1803
1804  - Send
1805    1.  **string** <ins>item</ins>
1806  - Receive
1807      - *No Message*
1808
1809### Server Code 120
1810
1811**Room Search**
1812
1813#### Function Names
1814
1815Museekd: SRoomSearch
1816Nicotine: RoomSearch
1817
1818#### Description
1819
1820We send this to the server to search files shared by users who have joined a specific chat room. The ticket/search id is a random number generated by the client and is used to track the search results.
1821
1822#### Data Order
1823
1824  - Send
1825    1.  **string** <ins>room</ins>
1826    2.  **uint** <ins>ticket</ins>
1827    3.  **string** <ins>search query</ins>
1828  - Receive
1829      - *No Message*
1830
1831### Server Code 121
1832
1833**Send Upload Speed**
1834
1835#### Function Names
1836
1837Museekd: SSendUploadSpeed
1838Nicotine: SendUploadSpeed
1839
1840#### Description
1841
1842We send this after a finished upload to let the server update the speed statistics for ourselves.
1843
1844#### Data Order
1845
1846  - Send *average upload transfer speed*
1847    1.  **uint** <ins>speed</ins>
1848  - Receive
1849      - *No Message*
1850
1851### Server Code 122
1852
1853**User Privileges**
1854
1855#### Function Names
1856
1857Museekd: SUserPrivileges
1858Nicotine: UserPrivileged
1859
1860#### Description
1861
1862**DEPRECATED, use [AddUser](#server-code-5) and [GetUserStatus](#server-code-7) server messages**
1863
1864We ask the server whether a user is privileged or not.
1865
1866#### Data Order
1867
1868  - Send
1869    1.  **string** <ins>username</ins>
1870  - Receive
1871    1.  **string** <ins>username</ins>
1872    2.  **bool** <ins>privileged</ins>
1873
1874### Server Code 123
1875
1876**Give Privileges**
1877
1878#### Function Names
1879
1880Museekd: SGivePrivileges
1881Nicotine: GivePrivileges
1882
1883#### Description
1884
1885We give (part of) our privileges, specified in days, to another user on the network.
1886
1887#### Data Order
1888
1889  - Send
1890    1.  **string** <ins>username</ins>
1891    2.  **uint** <ins>days</ins>
1892  - Receive
1893      - *No Message*
1894
1895### Server Code 124
1896
1897**Notify Privileges**
1898
1899#### Function Names
1900
1901Museekd: SNotifyPrivileges
1902Nicotine: NotifyPrivileges
1903
1904#### Description
1905
1906**DEPRECATED, no longer used**
1907
1908#### Data Order
1909
1910  - Send
1911    1.  **uint** <ins>token</ins>
1912    2.  **string** <ins>username</ins>
1913  - Receive
1914    1.  **uint** <ins>token</ins>
1915    2.  **string** <ins>username</ins>
1916
1917### Server Code 125
1918
1919**Acknowledge Privilege Notification**
1920
1921#### Function Names
1922
1923Museekd: SAckNotifyPrivileges
1924Nicotine: AckNotifyPrivileges
1925
1926#### Description
1927
1928**DEPRECATED, no longer used**
1929
1930#### Data Order
1931
1932  - Send
1933    1.  **uint** <ins>token</ins>
1934  - Receive
1935    1.  **uint** <ins>token</ins>
1936
1937### Server Code 126
1938
1939**Branch Level**
1940
1941#### Description
1942
1943We tell the server what our position is in our branch (xth generation) on the distributed network.
1944
1945#### Function Names
1946
1947Museekd: SBranchLevel
1948Nicotine: BranchLevel
1949
1950#### Data Order
1951
1952  - Send
1953    1.  **uint** <ins>branch level</ins>
1954  - Receive
1955      - *No Message*
1956
1957### Server Code 127
1958
1959**Branch Root**
1960
1961#### Description
1962
1963We tell the server the username of the root of the branch we're in on the distributed network.
1964
1965#### Function Names
1966
1967Museekd: SBranchRoot
1968Nicotine: BranchRoot
1969
1970#### Data Order
1971
1972  - Send
1973    1.  **string** <ins>branch root</ins>
1974  - Receive
1975      - *No Message*
1976
1977### Server Code 129
1978
1979**Child Depth**
1980
1981#### Description
1982
1983We tell the server the maximum number of generation of children we have on the distributed network.
1984
1985#### Function Names
1986
1987Museekd: SChildDepth
1988Nicotine: ChildDepth
1989
1990#### Data Order
1991
1992  - Send
1993    1.  **uint** <ins>child depth</ins>
1994  - Receive
1995      - *No Message*
1996
1997### Server Code 130
1998
1999**Reset Distributed**
2000
2001#### Function Names
2002
2003Museekd: Unimplemented
2004Nicotine: ResetDistributed
2005
2006#### Description
2007
2008The server asks us to reset our distributed parent and children.
2009
2010#### Data Order
2011
2012  - Send
2013      - *No Message*
2014  - Receive
2015      - Empty Message
2016
2017### Server Code 133
2018
2019**Private Room Users**
2020
2021#### Description
2022
2023The server sends us a list of room users that we can alter (add operator abilities / dismember).
2024
2025#### Function Names
2026
2027Museekd: SPrivRoomAlterableMembers
2028Nicotine: PrivateRoomUsers
2029
2030#### Data Order
2031
2032  - Send
2033    1.  *No Message*
2034  - Receive
2035    1.  **string** <ins>room</ins>
2036    2.  **uint** <ins>number of users</ins>
2037    3.  Iterate for <ins>number of users</ins>
2038        1.  **string** <ins>users</ins>
2039
2040### Server Code 134
2041
2042**Private Room Add User**
2043
2044#### Description
2045
2046We send this to inform the server that we've added a user to a private room.
2047
2048#### Function Names
2049
2050Museekd: SPrivRoomAddUser
2051Nicotine: PrivateRoomAddUser
2052
2053#### Data Order
2054
2055  - Send
2056    1.  **string** <ins>room</ins>
2057    2.  **string** <ins>username</ins>
2058  - Receive
2059    1.  **string** <ins>room</ins>
2060    2.  **string** <ins>username</ins>
2061
2062### Server Code 135
2063
2064**Private Room Remove User**
2065
2066#### Description
2067
2068We send this to inform the server that we've removed a user from a private room.
2069
2070#### Function Names
2071
2072Museekd: SPrivRoomRemoveUser
2073Nicotine: PrivateRoomRemoveUser
2074
2075#### Data Order
2076
2077  - Send
2078    1.  **string** <ins>room</ins>
2079    2.  **string** <ins>username</ins>
2080  - Receive
2081    1.  **string** <ins>room</ins>
2082    2.  **string** <ins>username</ins>
2083
2084### Server Code 136
2085
2086**Private Room Drop Membership**
2087
2088#### Description
2089
2090We send this to the server to remove our own membership of a private room.
2091
2092#### Function Names
2093
2094Museekd: SPrivRoomDismember
2095Nicotine: PrivateRoomDismember
2096
2097#### Data Order
2098
2099  - Send
2100    1.  **string** <ins>room</ins>
2101  - Receive
2102      - *No Message*
2103
2104### Server Code 137
2105
2106**Private Room Drop Ownership**
2107
2108#### Description
2109
2110We send this to the server to stop owning a private room.
2111
2112#### Function Names
2113
2114Museekd: SPrivRoomDisown
2115Nicotine: PrivateRoomDisown
2116
2117#### Data Order
2118
2119  - Send
2120    1.  **string** <ins>room</ins>
2121  - Receive
2122      - *No Message*
2123
2124### Server Code 138
2125
2126**Private Room Unknown**
2127
2128#### Description
2129
2130**OBSOLETE, no longer used**
2131
2132Unknown purporse
2133
2134#### Function Names
2135
2136Museekd: SPrivRoomUnknown138
2137Nicotine: PrivateRoomSomething
2138
2139#### Data Order
2140
2141  - Send
2142    1.  **string** <ins>room</ins>
2143  - Receive
2144    1.  **string** <ins>room</ins>
2145
2146### Server Code 139
2147
2148**Private Room Added**
2149
2150#### Description
2151
2152The server sends us this message when we are added to a private room.
2153
2154#### Function Names
2155
2156Museekd: SPrivRoomAdded
2157Nicotine: PrivateRoomAdded
2158
2159#### Data Order
2160
2161  - Send
2162      - *No Message*
2163  - Receive
2164    1.  **string** <ins>room</ins>
2165
2166### Server Code 140
2167
2168**Private Room Removed**
2169
2170#### Description
2171
2172The server sends us this message when we are removed from a private room.
2173
2174#### Function Names
2175
2176Museekd: SPrivRoomRemoved
2177Nicotine: PrivateRoomRemoved
2178
2179#### Data Order
2180
2181  - Send
2182      - *No Message*
2183  - Receive
2184    1.  **string** <ins>room</ins>
2185
2186### Server Code 141
2187
2188**Private Room Toggle**
2189
2190#### Description
2191
2192We send this when we want to enable or disable invitations to private rooms.
2193
2194#### Function Names
2195
2196Museekd: SPrivRoomToggle
2197Nicotine: PrivateRoomToggle
2198
2199#### Data Order
2200
2201  - Send
2202    1.  **bool** <ins>enable</ins>
2203  - Receive
2204    1.  **bool** <ins>enable</ins>
2205
2206### Server Code 142
2207
2208**New Password**
2209
2210#### Description
2211
2212We send this to the server to change our password. We receive a response if our password changes.
2213
2214#### Function Names
2215
2216Museekd: SNewPassword
2217Nicotine: ChangePassword
2218
2219#### Data Order
2220
2221  - Send
2222    1.  **string** <ins>pass</ins>
2223  - Receive
2224    1.  **string** <ins>pass</ins>
2225
2226### Server Code 143
2227
2228**Private Room Add Operator**
2229
2230#### Description
2231
2232We send this to the server to add private room operator abilities to a user.
2233
2234#### Function Names
2235
2236Museekd: SPrivRoomAddOperator
2237Nicotine: PrivateRoomAddOperator
2238
2239#### Data Order
2240
2241  - Send
2242    1.  **string** <ins>room</ins>
2243    2.  **string** <ins>username</ins>
2244  - Receive
2245    1.  **string** <ins>room</ins>
2246    2.  **string** <ins>username</ins>
2247
2248### Server Code 144
2249
2250**Private Room Remove Operator**
2251
2252#### Description
2253
2254We send this to the server to remove private room operator abilities from a user.
2255
2256#### Function Names
2257
2258Museekd: SPrivRoomRemoveOperator
2259Nicotine: PrivateRoomRemoveOperator
2260
2261#### Data Order
2262
2263  - Send
2264    1.  **string** <ins>room</ins>
2265    2.  **string** <ins>username</ins>
2266  - Receive
2267    1.  **string** <ins>room</ins>
2268    2.  **string** <ins>username</ins>
2269
2270### Server Code 145
2271
2272**Private Room Operator Added**
2273
2274#### Description
2275
2276The server send us this message when we're given operator abilities in a private room.
2277
2278#### Function Names
2279
2280Museekd: SPrivRoomOperatorAdded
2281Nicotine: PrivateRoomOperatorAdded
2282
2283#### Data Order
2284
2285  - Send
2286      - *No Message*
2287  - Receive
2288    1.  **string** <ins>room</ins>
2289
2290### Server Code 146
2291
2292**Private Room Operator Removed**
2293
2294#### Description
2295
2296The server send us this message when our operator abilities are removed in a private room.
2297
2298#### Function Names
2299
2300Museekd: SPrivRoomOperatorRemoved
2301Nicotine: PrivateRoomOperatorRemoved
2302
2303#### Data Order
2304
2305  - Send
2306      - *No Message*
2307  - Receive
2308    1.  **string** <ins>room</ins>
2309
2310### Server Code 148
2311
2312**Private Room Operators**
2313
2314#### Description
2315
2316The server sends us a list of operators in a specific room, that we can remove operator abilities from.
2317
2318#### Function Names
2319
2320Museekd: SPrivRoomAlterableOperators
2321Nicotine: PrivateRoomOwned
2322
2323#### Data Order
2324
2325  - Send
2326      - *No Message*
2327  - Receive
2328    1.  **string** <ins>room</ins>
2329    2.  **uint** <ins>number of operators in
2330        room</ins>
2331    3.  Iterate the <ins>number of operators</ins>
2332        **museekd uses a vector of strings**
2333        1.  **string** <ins>operator</ins>
2334
2335### Server Code 149
2336
2337**Message Users**
2338
2339#### Description
2340
2341Sends a broadcast private message to the given list of users.
2342
2343#### Function Names
2344
2345Museekd: SMessageUsers
2346Nicotine: MessageUsers
2347
2348#### Data Order
2349
2350  - Send
2351    1.  **uint** <ins>number of users</ins>
2352    2.  Iterate the <ins>number of users</ins>
2353        **museekd uses a vector of strings**
2354        1.  **string** <ins>username</ins>
2355    3.  **string** <ins>message</ins>
2356  - Receive
2357      - *No Message*
2358
2359### Server Code 150
2360
2361**Ask Public Chat**
2362
2363#### Description
2364
2365**DEPRECATED, used in Soulseek NS but not SoulseekQt**
2366
2367We ask the server to send us messages from all public rooms, also known as public chat.
2368
2369#### Function Names
2370
2371Museekd: SAskPublicChat
2372Nicotine: JoinPublicRoom
2373
2374#### Data Order
2375
2376  - Send
2377      - Empty Message
2378  - Receive
2379      - *No Message*
2380
2381### Server Code 151
2382
2383**Stop Public Chat**
2384
2385#### Description
2386
2387**DEPRECATED, used in Soulseek NS but not SoulseekQt**
2388
2389We ask the server to stop sending us messages from all public rooms, also known as public chat.
2390
2391#### Function Names
2392
2393Museekd: SStopPublicChat
2394Nicotine: LeavePublicRoom
2395
2396#### Data Order
2397
2398  - Send
2399      - Empty Message
2400  - Receive
2401      - *No Message*
2402
2403### Server Code 152
2404
2405**Public Chat Message**
2406
2407#### Description
2408
2409**DEPRECATED, used in Soulseek NS but not SoulseekQt**
2410
2411The server sends this when a new message has been written in a public room (every single line written in every public room).
2412
2413#### Function Names
2414
2415Museekd: SPublicChat
2416Nicotine: PublicRoomMessage
2417
2418#### Data Order
2419
2420  - Send
2421      - *No Message*
2422  - Receive
2423    1.  **string** <ins>room</ins>
2424    2.  **string** <ins>username</ins>
2425    3.  **string** <ins>message</ins>
2426
2427### Server Code 153
2428
2429**Related Searches**
2430
2431#### Description
2432
2433**OBSOLETE, server sends empty list as of 2018**
2434
2435The server returns a list of related search terms for a search query.
2436
2437#### Function Names
2438
2439Museekd: SRelatedSearch
2440Nicotine: RelatedSearch
2441
2442#### Data Order
2443
2444  - Send
2445    1.  **string** <ins>query</ins>
2446  - Receive
2447    1.  **string** <ins>query</ins>
2448    2.  **uint** <ins>number of terms</ins>
2449    3.  Iterate for <ins>number of term</ins>
2450        1.  **string** <ins>term</ins>
2451        2.  **uint** <ins>score</ins>
2452
2453### Server Code 1001
2454
2455**Can't Connect To Peer**
2456
2457#### Function Names
2458
2459Museekd: SCannotConnect
2460Nicotine: CantConnectToPeer
2461
2462#### Description
2463
2464We 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.
2465
2466See also: [Peer Connection Message Order](#peer-connection-message-order)
2467
2468#### Data Order
2469
2470  - Send *to the Server if we cannot connect to a peer.*
2471    1.  **uint** <ins>token</ins>
2472    2.  **string** <ins>username</ins>
2473  - Receive *this response means we are both firewalled or otherwise
2474    unable to connect to each other.*
2475    1.  **uint** <ins>token</ins>
2476    2.  **string** <ins>username</ins>
2477
2478### Server Code 1003
2479
2480**Can't Create Room**
2481
2482#### Function Names
2483
2484Museekd: Unimplemented
2485Nicotine: CantCreateRoom
2486
2487#### Description
2488
2489Server tells us a new room cannot be created. This message only seems to be sent if you try to create a room with the same name as an existing private room. In other cases, such as using a room name with leading or trailing spaces, only a private message containing an error message is sent.
2490
2491#### Data Order
2492
2493  - Send
2494      - *No Message*
2495  - Receive
2496    1.  **string** <ins>room</ins>
2497
2498# Peer Init Messages
2499
2500| Send         | Receive           |
2501| ------------ | ----------------- |
2502| Send to Peer | Receive from Peer |
2503
2504In museekd 0.1.13, these messages are sent and received in
2505Museek/BaseConnection.cc and defined in Museek/InitMessages.hh. Since museekd 0.2, they are defined in museekd/handshakemessages.h.
2506
2507In 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.
2508
2509#### Message Format
2510
2511| Message Length | Code   | Message Contents |
2512| -------------- | ------ | ---------------- |
2513| 4 Bytes        | 1 Byte | ...              |
2514
2515#### Message Index
2516
2517| Code | Message                              |
2518| ---- | ------------------------------------ |
2519| 0    | [Pierce Firewall](#peer-init-code-0) |
2520| 1    | [Peer Init](#peer-init-code-1)       |
2521
2522### Peer Connection Message Order
2523
25241.  User A sends a [Peer Init](#peer-init-code-1) to User B.
2525If this succeeds, a connection is established, and User A is free to send peer messages.
2526If this fails (socket cannot connect), User A proceeds with an indirect connection request (step 2).
25272.  User A sends [ConnectToPeer](#server-code-18) to the Server with a unique token
25283.  The Server sends a [ConnectToPeer](#server-code-18) response to User B with the same token
25294.  User B sends a [Pierce Firewall](#peer-init-code-0) to User A with the same token.
2530If this succeeds, a connection is established, and User A is free to send peer messages.
2531If this fails, User B retries for ~1 minute. If this still fails, no connection is possible, and User B proceeds with step 5.
25325.  User B sends a [Cannot Connect](#server-code-1001) to the Server.
25336.  The Server sends a [Cannot Connect](#server-code-1001) response to User A.
2534
2535### Peer Init Code 0
2536
2537**Pierce Firewall**
2538
2539#### Function Names
2540
2541Museekd: HPierceFirewall
2542Nicotine: PierceFireWall
2543
2544#### Description
2545
2546This 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.
2547
2548See also: [Peer Connection Message Order](#peer-connection-message-order)
2549
2550#### Data Order
2551
2552  - Send
2553      - **uint** <ins>token</ins> *Unique Number*
2554  - Receive
2555      - **uint** <ins>token</ins> *Unique Number*
2556
2557### Peer Init Code 1
2558
2559**Peer Init**
2560
2561#### Function Names
2562
2563Museekd: HInitiate
2564Nicotine: PeerInit
2565
2566#### Description
2567
2568This 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.
2569
2570See also: [Peer Connection Message Order](#peer-connection-message-order)
2571
2572#### Data Order
2573
2574  - Send
2575      - **string** <ins>username</ins> *Local Username*
2576      - **string** <ins>type</ins> *Connection Type (P, F or D)*
2577      - **uint** <ins>token</ins> *Unique Number*
2578  - Receive
2579      - **string** <ins>username</ins> *Remote Username*
2580      - **string** <ins>type</ins> *Connection Type (P, F or D)*
2581      - **uint** <ins>token</ins> *Unique Number*
2582
2583# Peer Messages
2584
2585| Send         | Receive           |
2586| ------------ | ----------------- |
2587| Send to Peer | Receive from Peer |
2588
2589In museekd 0.1.13, these messages are sent and received in
2590Museek/PeerConnection.cc and defined in Museek/PeerMessages.hh. Since
2591museekd 0.2, they are defined in museekd/peermessages.h.
2592
2593In 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.
2594
2595#### Message Format
2596
2597| Message Length | Code    | Message Contents |
2598| -------------- | ------- | ---------------- |
2599| 4 Bytes        | 4 Bytes | ...              |
2600
2601#### Message Index
2602
2603| Code | Message                                    | Status     |
2604| ---- | ------------------------------------------ | ---------- |
2605| 4    | [Shares Request](#peer-code-4)             |            |
2606| 5    | [Shares Reply](#peer-code-5)               |            |
2607| 8    | [Search Request](#peer-code-8)             | Obsolete   |
2608| 9    | [Search Reply](#peer-code-9)               |            |
2609| 15   | [User Info Request](#peer-code-15)         |            |
2610| 16   | [User Info Reply](#peer-code-16)           |            |
2611| 36   | [Folder Contents Request](#peer-code-36)   |            |
2612| 37   | [Folder Contents Reply](#peer-code-37)     |            |
2613| 40   | [Transfer Request](#peer-code-40)          |            |
2614| 41   | [Upload Reply](#peer-code-41-a)            |            |
2615| 41   | [Download Reply](#peer-code-41-b)          | Deprecated |
2616| 41   | [Transfer Reply](#peer-code-41-c)          |            |
2617| 42   | [Upload Placehold](#peer-code-42)          | Obsolete   |
2618| 43   | [Queue Upload](#peer-code-43)              |            |
2619| 44   | [Place In Queue Reply](#peer-code-44)      |            |
2620| 46   | [Upload Failed](#peer-code-46)             |            |
2621| 50   | [Upload Denied](#peer-code-50)             |            |
2622| 51   | [Place In Queue Request](#peer-code-51)    |            |
2623| 52   | [Upload Queue Notification](#peer-code-52) | Deprecated |
2624
2625### Peer Code 4
2626
2627**Shares Request**
2628
2629#### Function Names
2630
2631Museekd: PSharesRequest
2632Nicotine: GetShareFileList
2633
2634#### Description
2635
2636We send this to a peer to ask for a list of shared files.
2637
2638#### Data Order
2639
2640  - Send
2641      - Empty Message
2642  - Receive
2643      - Empty Message
2644
2645### Peer Code 5
2646
2647**Shares Reply**
2648
2649#### Function Names
2650
2651Museekd: PSharesReply
2652Nicotine: SharedFileList
2653
2654#### Description
2655
2656A peer responds with a list of shared files when we've sent a GetSharedFileList.
2657
2658#### Data Order
2659
2660  - Send *shares database*
2661    1.  Iterate thru shares database
2662        1.  **data**
2663  - Receive *shares database*
2664    1.  decompress
2665    2.  **uint** <ins>number of directories</ins>
2666    3.  Iterate <ins>number of directories</ins>
2667        1.  **string** <ins>directory</ins>
2668        2.  **uint** <ins>number of files</ins>
2669        3.  Iterate <ins>number of files</ins>
2670            1.  **uchar** ??? (unused)
2671            2.  **string** <ins>filename</ins>
2672            3.  **unit64** <ins>size</ins> *File
2673                size*
2674            4.  **string** <ins>ext</ins>
2675                *Extentsion*
2676            5.  **uint** <ins>number of
2677                attributes</ins>
2678            6.  Iterate <ins>number of
2679                attributes</ins>
2680                1.  **uint** <ins>place in
2681                    attributes</ins> (unused by museekd)
2682                2.  **uint** <ins>attribute</ins>
2683    4.  **uint** <ins>unknown</ins> *official clients always send a value of 0*
2684    5.  **uint** <ins>number of private directories</ins>
2685    6.  Iterate <ins>number of private directories</ins>
2686        1.  **string** <ins>directory</ins>
2687        2.  **uint** <ins>number of files</ins>
2688        3.  Iterate <ins>number of files</ins>
2689            1.  **uchar** ??? (unused)
2690            2.  **string** <ins>filename</ins>
2691            3.  **uint64** <ins>size</ins> *File
2692                size*
2693            4.  **string** <ins>ext</ins>
2694                *Extentsion*
2695            5.  **uint** <ins>number of
2696                attributes</ins>
2697            6.  Iterate <ins>number of
2698                attributes</ins>
2699                1.  **uint** <ins>place in
2700                    attributes</ins> (unused by museekd)
2701                2.  **uint** <ins>attribute</ins>
2702
2703### Peer Code 8
2704
2705**Search Request**
2706
2707#### Function Names
2708
2709Museekd: PSearchRequest
2710Nicotine: FileSearchRequest
2711
2712#### Description
2713
2714**OBSOLETE, use [UserSearch](#server-code-42) server message**
2715
2716We 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.
2717
2718#### Data Order
2719
2720  - Send
2721    1.  **uint** <ins>ticket</ins>
2722    2.  **string** <ins>query</ins>
2723  - Receive
2724    1.  **uint** <ins>ticket</ins>
2725    2.  **string** <ins>query</ins>
2726
2727### Peer Code 9
2728
2729**Search Reply**
2730
2731#### Function Names
2732
2733Museekd: PSearchReply
2734Nicotine: FileSearchResult
2735
2736#### Description
2737
2738A peer sends this message when it has a file search match. The token/ticket is taken from original FileSearch, UserSearch or RoomSearch message.
2739
2740#### Data Order
2741
2742  - Send
2743    1.  **string** <ins>username</ins>
2744    2.  **uint** <ins>ticket</ins>
2745    3.  **uint** <ins>results size</ins> *number of results*
2746    4.  Iterate for number of results
2747        1.  **uchar** 1
2748        2.  **string** <ins>filename</ins>
2749        3.  **uint64** <ins>size</ins>
2750        4.  **string** <ins>ext</ins>
2751        5.  **uint** <ins>attribute size</ins>
2752        6.  Iterate <ins>number of attributes</ins>
2753            1.  **uint** <ins>place in
2754                attributes</ins>
2755            2.  **uint** <ins>attribute</ins>
2756    5.  **bool** <ins>slotfree</ins>
2757    6.  **uint** <ins>avgspeed</ins>
2758    7.  **uint64** <ins>queue length</ins>
2759    8.  **uint** <ins>private results size</ins> *number of privately shared results*
2760    9.  Iterate for number of privately shared results
2761        1.  **uchar** 1
2762        2.  **string** <ins>filename</ins>
2763        3.  **uint64** <ins>size</ins>
2764        4.  **string** <ins>ext</ins>
2765        5.  **uint** <ins>attribute size</ins>
2766        6.  Iterate <ins>number of attributes</ins>
2767            1.  **uint** <ins>place in
2768                attributes</ins>
2769            2.  **uint** <ins>attribute</ins>
2770  - Receive
2771    1.  decompress
2772    2.  **string** <ins>username</ins>
2773    3.  **uint** <ins>ticket</ins>
2774    4.  **uint** <ins>results size</ins> *number of results*
2775    5.  Iterate for <ins>number of results</ins>
2776        1.  **string** <ins>filename</ins>
2777        2.  **uint64** <ins>size</ins>
2778        3.  **string** <ins>ext</ins>
2779        4.  **uint** <ins>number of attributes</ins>
2780        5.  Iterate <ins>number of attributes</ins>
2781            1.  **uint** <ins>place in
2782                attributes</ins>
2783            2.  **uint** <ins>attribute</ins>
2784    6.  **bool** <ins>slotfree</ins>
2785    7.  **uint** <ins>avgspeed</ins>
2786    8.  **uint64** <ins>queue length</ins>
2787    9.  **uint** <ins>private results size</ins> *number of privately shared results*
2788    10.  Iterate for <ins>number of privately shared results</ins>
2789         1.  **string** <ins>filename</ins>
2790         2.  **uint64** <ins>size</ins>
2791         3.  **string** <ins>ext</ins>
2792         4.  **uint** <ins>number of attributes</ins>
2793         5.  Iterate <ins>number of attributes</ins>
2794             1.  **uint** <ins>place in
2795                 attributes</ins>
2796             2.  **uint** <ins>attribute</ins>
2797
2798### Peer Code 15
2799
2800**User Info Request**
2801
2802#### Function Names
2803
2804Museekd: PInfoRequest
2805Nicotine: UserInfoRequest
2806
2807#### Description
2808
2809We ask the other peer to send us their user information, picture and all.
2810
2811#### Data Order
2812
2813  - Send
2814      - Empty Message
2815  - Receive
2816      - Empty Message
2817
2818### Peer Code 16
2819
2820**User Info Reply**
2821
2822#### Function Names
2823
2824Museekd: PInfoReply
2825Nicotine: UserInfoReply
2826
2827#### Description
2828
2829A peer responds with this when we've sent a UserInfoRequest.
2830
2831#### Data Order
2832
2833  - Send
2834    1.  **string** <ins>description</ins>
2835    2.  Check contents of <ins>picture</ins>
2836          - If <ins>picture</ins> is not empty
2837            1.  **bool** <ins>has picture</ins> 1
2838            2.  **string** <ins>picture</ins>
2839          - If <ins>picture</ins> is empty
2840            1.  **bool** <ins>has picture</ins> 0
2841    3.  **uint** <ins>totalupl</ins>
2842    4.  **uint** <ins>queuesize</ins>
2843    5.  **bool** <ins>slotsfree</ins> *Can immediately upload*
2844    6.  **uint** <ins>uploadpermitted</ins> *Who can upload anything to us?*
2845        *0 == No one; 1 == Everyone; 2 == Users in List; 3 == Trusted Users*
2846  - Receive
2847    1.  **string** <ins>description</ins>
2848    2.  **bool** <ins>has picture</ins>
2849    3.  Check contents of <ins>has picture</ins>
2850        1.  If <ins>has picture</ins> is not empty
2851            1.  **string** <ins>picture</ins>
2852    4.  **uint** <ins>totalupl</ins>
2853    5.  **uint** <ins>queuesize</ins>
2854    6.  **bool** <ins>slotsfree</ins> *Can immediately download*
2855    7.  **uint** <ins>uploadpermitted</ins> *Who can upload anything to this user (not sent by SoulseekQt)?*
2856        *0 == No one; 1 == Everyone; 2 == Users in List; 3 == Trusted Users*
2857
2858### Peer Code 36
2859
2860**Folder Contents Request**
2861
2862#### Function Names
2863
2864Museekd: PFolderContentsRequest
2865Nicotine: FolderContentsRequest
2866
2867#### Description
2868
2869We ask the peer to send us the contents of a single folder.
2870
2871#### Data Order
2872
2873  - Send
2874    1.  **uint** <ins>number of files in
2875        directory</ins>
2876    2.  Iterate <ins>number of files in
2877        directory</ins>
2878        1.  **string** <ins>file</ins>
2879  - Receive
2880    1.  **uint** <ins>number of files in
2881        directory</ins>
2882    2.  Iterate <ins>number of files in
2883        directory</ins>
2884        1.  **string** <ins>file</ins>
2885
2886### Peer Code 37
2887
2888**Folder Contents Reply**
2889
2890#### Function Names
2891
2892Museekd: PFolderContentsReply
2893Nicotine: FolderContentsResponse
2894
2895#### Description
2896
2897A peer responds with the contents of a particular folder (with all subfolders) when we've sent a FolderContentsRequest.
2898
2899#### Data Order
2900
2901  - Send
2902    1.  **uint** <ins>number of folders</ins>
2903    2.  Iterate for <ins>number of folders</ins>
2904        1.  **string** <ins>dir</ins>
2905        2.  **uint** <ins>number of files</ins>
2906        3.  Iterate <ins>number of files</ins>
2907            1.  **uchar** <ins>1</ins>
2908            2.  **string** <ins>file</ins>
2909            3.  **uint64** <ins>size</ins>
2910            4.  **string** <ins>ext</ins> Extension
2911            5.  **uint** <ins>number of
2912                attributes</ins>
2913                1.  **uint** <ins>attribute
2914                    number</ins>
2915                2.  **uint** <ins>attribute</ins>
2916  - Receive
2917    1.  decompress
2918    2.  **uint** <ins>number of folders</ins>
2919    3.  Iterate for <ins>number of folders</ins>
2920        1.  **string** <ins>dir</ins>
2921        2.  **uint** <ins>number of files</ins>
2922        3.  Iterate <ins>number of files</ins>
2923            1.  **uchar** <ins>???</ins> (unused)
2924            2.  **string** <ins>file</ins>
2925            3.  **uint64** <ins>size</ins>
2926            4.  **string** <ins>ext</ins> Extension
2927            5.  **uint** <ins>number of
2928                attributes</ins>
2929                1.  **uint** <ins>attribute
2930                    number</ins>
2931                2.  **uint** <ins>attribute</ins>
2932
2933### Peer Code 40
2934
2935**Transfer Request**
2936
2937#### Function Names
2938
2939Museekd: PTransferRequest
2940Nicotine: TransferRequest
2941
2942#### Description
2943
2944This message is sent by a peer once they are ready to start uploading a file. A [TransferResponse](#peer-code-41-a) message is expected from the recipient, either allowing or rejecting the upload attempt.
2945
2946This message was formely used to send a download request (direction 0) as well, but Nicotine+, Museek+ and the official clients use the [QueueUpload](#peer-code-43) message for this purpose today.
2947
2948#### Data Order
2949
2950  - Send
2951    1.  **uint** <ins>direction</ins>
2952    2.  **uint** <ins>ticket</ins>
2953    3.  **string** <ins>filename</ins>
2954    4.  Check contents of <ins>direction</ins>
2955          - **uint64** <ins>filesize</ins> *if
2956            direction == 1*
2957  - Receive
2958    1.  **uint** <ins>direction</ins>
2959    2.  **uint** <ins>ticket</ins>
2960    3.  **string** <ins>filename</ins>
2961    4.  Check contents of <ins>direction</ins>
2962          - **uint64** <ins>filesize</ins> *if
2963            direction == 1*
2964
2965### Peer Code 41 a
2966
2967**Upload Reply**
2968
2969#### Function Names
2970
2971Museekd: PUploadReply
2972Nicotine: TransferResponse
2973
2974#### Description
2975
2976Response to TransferRequest - either we (or the other peer) agrees, or tells the reason for rejecting the file transfer.
2977
2978#### Data Order
2979
2980  - Send
2981    1.  **uint** <ins>ticket</ins>
2982    2.  **bool** <ins>allowed</ins>
2983    3.  Check contents of <ins>allowed</ins>
2984          - **uint64** <ins>filesize</ins> *if
2985            allowed == 1*
2986          - **string** <ins>reason</ins> *if allowed
2987            == 0*
2988  - Receive
2989      - *No Message*
2990
2991### Peer Code 41 b
2992
2993**Download Reply**
2994
2995#### Function Names
2996
2997Museekd: PDownloadReply
2998Nicotine: TransferResponse
2999
3000#### Description
3001
3002**DEPRECATED, use QueueUpload to request files**
3003
3004Response to TransferRequest - either we (or the other peer) agrees, or tells the reason for rejecting the file transfer.
3005
3006#### Data Order
3007
3008  - Send
3009    1.  **uint** <ins>ticket</ins>
3010    2.  **bool** <ins>allowed</ins>
3011    3.  Check contents of <ins>allowed</ins>
3012          - **string** <ins>reason</ins> *if allowed
3013            == 0*
3014  - Receive
3015      - *No Message*
3016
3017### Peer Code 41 c
3018
3019**Transfer Reply**
3020
3021#### Function Names
3022
3023Museekd: PTransferReply
3024Nicotine: TransferResponse
3025
3026#### Description
3027
3028Response to TransferRequest - either we (or the other peer) agrees, or tells the reason for rejecting the file transfer.
3029
3030#### Data Order
3031
3032  - Send
3033      - *No Message*
3034  - Receive
3035    1.  **uint** <ins>ticket</ins>
3036    2.  **bool** <ins>allowed</ins> == 1
3037    3.  Check contents of <ins>allowed</ins>
3038          - **uint64** <ins>filesize</ins> *if
3039            allowed == 1*
3040          - **string** <ins>reason</ins> *if allowed
3041            == 0*
3042
3043### Peer Code 42
3044
3045**Upload Placehold**
3046
3047#### Function Names
3048
3049Museekd: PUploadPlacehold
3050Nicotine: PlaceholdUpload
3051
3052#### Description
3053
3054**OBSOLETE, no longer used**
3055
3056#### Data Order
3057
3058  - Send
3059    1.  **string** <ins>filename</ins>
3060  - Receive
3061    1.  **string** <ins>filename</ins>
3062
3063### Peer Code 43
3064
3065**Queue Upload**
3066
3067#### Function Names
3068
3069Museekd: PQueueDownload
3070Nicotine: QueueUpload
3071
3072#### Description
3073
3074This message is used to tell a peer that an upload should be queued on their end. Once the recipient is ready to transfer the requested file, they will send an upload request.
3075
3076#### Data Order
3077
3078  - Send
3079    1.  **string** <ins>filename</ins>
3080  - Receive
3081    1.  **string** <ins>filename</ins>
3082
3083### Peer Code 44
3084
3085**Place In Queue Reply**
3086
3087#### Function Names
3088
3089Museekd: PPlaceInQueueReply
3090Nicotine: PlaceInQueue
3091
3092#### Description
3093
3094The peer replies with the upload queue placement of the requested file.
3095
3096#### Data Order
3097
3098  - Send
3099    1.  **string** <ins>filename</ins>
3100    2.  **uint** <ins>place</ins>
3101  - Receive
3102    1.  **string** <ins>filename</ins>
3103    2.  **uint** <ins>place</ins>
3104
3105### Peer Code 46
3106
3107**Upload Failed**
3108
3109#### Function Names
3110
3111Museekd: PUploadFailed
3112Nicotine: UploadFailed
3113
3114#### Description
3115
3116This message is sent whenever a file connection of an active upload closes. Soulseek NS clients can also send this message when a file can not be read. The recipient either re-queues the upload (download on their end), or ignores the message if the transfer finished.
3117
3118#### Data Order
3119
3120  - Send
3121    1.  **string** <ins>filename</ins>
3122  - Receive
3123    1.  **string** <ins>filename</ins>
3124
3125### Peer Code 50
3126
3127**Upload Denied**
3128
3129#### Function Names
3130
3131Museekd: PQueueFailed
3132Nicotine: UploadDenied
3133
3134#### Description
3135
3136This message is sent to reject QueueUpload attempts and previously queued files. The reason for rejection will appear in the transfer list of the recipient.
3137
3138#### Data Order
3139
3140  - Send
3141    1.  **string** <ins>filename</ins>
3142    2.  **string** <ins>reason</ins>
3143  - Receive
3144    1.  **string** <ins>filename</ins>
3145    2.  **string** <ins>reason</ins>
3146
3147### Peer Code 51
3148
3149**Place In Queue Request**
3150
3151#### Function Names
3152
3153Museekd: PPlaceInQueueRequest
3154Nicotine: PlaceInQueueRequest
3155
3156#### Description
3157
3158This message is sent when asking for the upload queue placement of a file.
3159
3160#### Data Order
3161
3162  - Send
3163    1.  **string** <ins>filename</ins>
3164  - Receive
3165    1.  **string** <ins>filename</ins>
3166
3167### Peer Code 52
3168
3169**Upload Queue Notification**
3170
3171#### Function Names
3172
3173Museekd: PUploadQueueNotification
3174Nicotine: UploadQueueNotification
3175
3176#### Description
3177
3178**DEPRECATED, sent by Soulseek NS but not SoulseekQt**
3179
3180This message is sent to inform a peer about an upload attempt initiated by us.
3181
3182#### Data Order
3183
3184  - Send
3185      - Empty Message
3186  - Receive
3187      - Empty Message
3188
3189# File Messages
3190
3191| Send         | Receive           |
3192| ------------ | ----------------- |
3193| Send to Peer | Receive from Peer |
3194
3195These messages are sent to peers over a 'F' connection, and do not have messages codes associated with them.
3196
3197#### File Connection Message Format
3198
3199| Message Contents |
3200| ---------------- |
3201| ...              |
3202
3203#### File Connection Message Index
3204
3205| Message                       |
3206| ----------------------------- |
3207| [File Request](#file-request) |
3208| [File Offset](#file-offset)   |
3209
3210### File Request
3211
3212#### Function Names
3213
3214Nicotine: FileRequest
3215
3216#### Description
3217
3218We sent this to a peer via a 'F' connection to tell them that we want to start uploading a file. The token is the same as the one previously included in the TransferRequest message.
3219
3220#### Data Order
3221
3222  - Send
3223      - **uint** <ins>token</ins>
3224  - Receive
3225      - **uint** <ins>token</ins>
3226
3227### File Offset
3228
3229#### Function Names
3230
3231Nicotine: FileOffset
3232
3233#### Description
3234
3235We send this to the uploading peer at the beginning of a 'F' connection, to tell them how many bytes of the file we've previously downloaded. If none, the offset is 0.
3236
3237#### Data Order
3238
3239  - Send
3240      - **uint64** <ins>offset</ins>
3241  - Receive
3242      - **uint64** <ins>offset</ins>
3243
3244# Distributed Messages
3245
3246| Send         | Receive           |
3247| ------------ | ----------------- |
3248| Send to Node | Receive from Node |
3249
3250In museekd 0.1.13, these messages are sent and received in
3251Museek/DistribConnection.cc and defined in Museek/DistribMessages.hh.
3252Since museekd 0.2, they are defined in museekd/distributedmessages.h.
3253
3254In 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.
3255
3256#### The Message format
3257
3258| Message Length | Code   | Message Contents |
3259| -------------- | ------ | ---------------- |
3260| 4 Bytes        | 1 Byte | ...              |
3261
3262#### Message Index
3263
3264| Code | Message                                  | Status     |
3265| ---- | ---------------------------------------- | ---------- |
3266| 0    | [Ping](#distributed-code-0)              |            |
3267| 3    | [Search Request](#distributed-code-3)    |            |
3268| 4    | [Branch Level](#distributed-code-4)      |            |
3269| 5    | [Branch Root](#distributed-code-5)       |            |
3270| 7    | [Child Depth](#distributed-code-7)       | Deprecated |
3271| 93   | [Embedded Message](#distributed-code-93) |            |
3272
3273### Distributed Code 0
3274
3275**Ping**
3276
3277#### Description
3278
3279Send it every 60 sec.
3280
3281#### Function Names
3282
3283Museekd: DPing
3284Nicotine: DistribAlive
3285
3286#### Data Order
3287
3288  - Send
3289      - Empty Message
3290  - Receive
3291    1.  **uint** <ins>unknown</ins>
3292
3293### Distributed Code 3
3294
3295**Search Request**
3296
3297#### Description
3298
3299Search request that arrives through the distributed network.
3300We transmit the search request to our child peers.
3301
3302#### Function Names
3303
3304Museekd: DSearchRequest
3305Nicotine: DistribSearch
3306
3307#### Data Order
3308
3309  - Send
3310    1.  **uint** <ins>unknown</ins>
3311    2.  **string** <ins>username</ins>
3312    3.  **uint** <ins>ticket</ins>
3313    4.  **string** <ins>query</ins>
3314  - Receive
3315    1.  **uint** <ins>unknown</ins>
3316    2.  **string** <ins>username</ins>
3317    3.  **uint** <ins>ticket</ins>
3318    4.  **string** <ins>query</ins>
3319
3320### Distributed Code 4
3321
3322**Branch Level**
3323
3324#### Description
3325
3326We tell our distributed children what our position is in our branch (xth generation) on the distributed network.
3327
3328#### Function Names
3329
3330Museekd: DBranchLevel
3331Nicotine: DistribBranchLevel
3332
3333#### Data Order
3334
3335  - Send
3336    1.  **int** <ins>branch level</ins>
3337  - Receive
3338    1.  **int** <ins>branch level</ins>
3339
3340### Distributed Code 5
3341
3342**Branch Root**
3343
3344#### Description
3345
3346We tell our distributed children the username of the root of the branch we're in on the distributed network.
3347
3348#### Function Names
3349
3350Museekd: DBranchRoot
3351Nicotine: DistribBranchRoot
3352
3353#### Data Order
3354
3355  - Send
3356    1.  **string** <ins>branch root</ins>
3357  - Receive
3358    1.  **string** <ins>branch root</ins>
3359
3360### Distributed Code 7
3361
3362**Child Depth**
3363
3364#### Description
3365
3366**DEPRECATED, sent by Soulseek NS but not SoulseekQt**
3367
3368We tell our distributed parent the maximum number of generation of children we have on the distributed network.
3369
3370#### Function Names
3371
3372Museekd: DChildDepth
3373Nicotine: DistribChildDepth
3374
3375#### Data Order
3376
3377  - Send
3378    1.  **uint** <ins>child depth</ins>
3379  - Receive
3380    1.  **uint** <ins>child depth</ins>
3381
3382### Distributed Code 93
3383
3384**Embedded Message**
3385
3386A branch root sends us an embedded distributed message. The only type of distributed message sent at present is [DistribSearch](#distributed-code-3) (distributed code 3). We unpack the distributed message and distribute it to our child peers.
3387
3388#### Function Names
3389
3390Museekd: Unimplemented
3391Nicotine: DistribEmbeddedMessage
3392
3393#### Data Order
3394
3395  - Send
3396    1.  **uchar** <ins>distributed code</ins>
3397    2.  **bytes** <ins>distributed message</ins> *Raw message associated with distributed code*
3398  - Receive
3399    1.  **uchar** <ins>distributed code</ins>
3400    2.  **bytes** <ins>distributed message</ins> *Raw message associated with distributed code*
3401
3402# Museek Data Types
3403
3404### StringMap
3405
3406  - std::map\<std::string, std::string\>
3407
3408### StringList
3409
3410  - std::vector\<std::string\>
3411
3412### WStringList
3413
3414  - std::vector\<std::wstring\> WStringList
3415
3416### WTickers
3417
3418  - std::map\<std::string, std::wstring\>
3419
3420### Recommendations, SimilarUsers, RoomList
3421
3422  - std::map\<std::string, uint\>
3423
3424### NetInfo
3425
3426  - std::map\<std::string, std::pair\<std::string, uint\> \>
3427
3428### UserData
3429
34301.  **uint** <ins>status</ins> *Online Status*
34312.  **uint** <ins>avgspeed</ins> *Average Speed*
34323.  **uint64** <ins>uploadnum</ins> *Number of uploaded files. The value changes when sending a [SendUploadSpeed](#server-code-121) server message, and is likely used by the server to calculate the average speed.*
34334.  **uint** <ins>files</ins> *Files shared*
34345.  **uint** <ins>dirs</ins> *Directories shared*
34356.  **bool** <ins>slotsfree</ins> *Slots free*
34367.  **string** <ins>countrycode</ins> *Uppercase country code*
3437
3438### RoomData
3439
3440  - std::map\<std::string, UserData\>
3441
3442### Folder
3443
3444  - std::map\<std::string, FileEntry\>
3445
3446### Shares
3447
3448  - std::map\<std::string, Folder\>
3449
3450### WFolder
3451
3452  - std::map\<std::wstring, FileEntry\>
3453
3454### Folders
3455
3456  - std::map\<std::string, Shares\>
3457
3458### WShares
3459
3460  - std::map\<std::wstring, WFolder\>
3461
3462### WFolders
3463
3464  - std::map\<std::wstring, WShares\>
3465
3466### off\_t
3467
3468  - Packed as a 64bit Integer
3469
3470# Credits
3471
3472This documentation exists thanks to efforts from the following projects:
3473
3474- Nicotine+ (Hyriand, daelstorm, mathiascode)
3475- Museek+ (lbponey)
3476- SoleSeek
3477- PySoulSeek
3478