Secondary Client -  Browse Sequence



                   
The typical browse sequence is as following.



Browsing Request ( 0x1B59 - Secondary to Primary) -> Browse Entry ( 0x1BBC - Primary to Secondary )->Browse Completed ( 0x1BC6 - Primary to Secondary )-> Browsing End Notification (0x1B5A - Secondary to Primary)


If an error is encountered during the request stage a 0x1BD0 packet is despatched indicating the relevant error string.  

Lets look into this in more detail.


Scenario: We are about to browse a WPN Secondary client.


Lets begin by contacting a Primary Node and sending the 0x1B59 browse request packet in the following format.

Browse Request Format.
[0x1B59][ Packet Data Length : 2 ][ "WinMX " : 6 ][ User IP & Port  ASCII : 12 ][ 00 :1 ][ UserName : S ][ 00 : 1 ]

Actually sent: Brackets added for clarity.
[59 1B][24 00][57 69 6E 4D 58 20][34 39 64 31 34 30 35 31 31 38 37 31][00][47 75 6D 64 72 6F 70 36 30 39 5F 32 31 38 38 34][00]

ASCII = Y$ WinMX 49d140511871 Gumdrop609_21884





In reply we will receive the following information from the Primary Node

Browse Entry/Result Format
[0x1BBC][ Packet Data Length : 2 ][ "WinMX " : 6 ][ User IP & Port  ASCII : 12 ][ 00 : 1 ][ UserName : S ][ 00 : 1 ][ FileName : S ][ 00 : 1 ][ File Hash : 20 ][ File Size : 4 ][ MetaData Length :  1 ][ Metadata Type : 1 ][ Bitrate : 2 ][ Frequency : 4 ][ Playtime : 4 ]  

The MetaData Length is zero for all files not containing meta data, and will indicate the completion of the packet.
If the MetaDataLength is not zero then a MetaData Type marker (4D) will be present and the Bitrate, Frequency And Playtime fields are added as shown above.

Actually sent: Brackets added for clarity.
[BC 1B][56 00][57 69 6E 4D 58 20][ 34 39 64 31 34 30 35 31 31 38 37 31][00][47 75 6D 64 72 6F 70 36 30 39 5F 32 31 38 38 34][00][48 65 6C 6C 6F 5C 52 6F 62 6F 20 52 65 73 6F 75 72 63 65 73 2E 72 61 72][00][ 57 C6 B2 34 77 D7 2E 2B 0B E9 9E A8 99 FB 3A B3 8D 59 00 00][ 8D 59 00 00][00]

ASCII =  ?V WinMX 49d140511871 Gumdrop609_21884 Hello\Robo Resources.rar WƲ4w׮+ ��??  ?Y  





This results packet will be repeatedly sent by the primary until all of the shared files list is delivered.
Once this occurs the primary will indicate that the list has been succesfully delivered by sending a 1BC6 packet.

Browse List Completed
[0x1BC6][ Packet Data Length : 2 ][ "WinMX " : 6 ][ User IP & Port  ASCII : 12 ][ 00 : 1 ][ UserName : N ][ 00 : 1 ]

Actually sent: Brackets added for clarity.
[C6 1B][24 00][57 69 6E 4D 58 20 34 39 64 31 34 30 35 31 31 38 37 31][00][47 75 6D 64 72 6F 70 36 30 39 5F 32 31 38 38 34][00]

ASCII = ƛ$  WinMX 49d140511871 Gumdrop609_21884





Once the query originating client closes the browse window a 1B5A packet is sent to the primary to indicate this

Browse End Notification
[0x1B5A][ Packet Data Length : 2 ][ "WinMX " : 6 ][ User IP & Port  ASCII : 12 ][ 00 :1 ][ UserName : S ][ 00 : 1 ]

Actually sent: Brackets added for clarity.
[5A 1B][24 00][57 69 6E 4D 58 20 34 39 64 31 34 30 35 31 31 38 37 31][00][47 75 6D 64 72 6F 70 36 30 39 5F 32 31 38 38 34][00]    

ASCII = Z$ WinMX 49d140511871 Gumdrop609_21884





This then is the complete sequence for a standard browse routine but we have to add one more packet type for reference, this is the browse error packet 1BD0, this can be sent by the primary at any time after the initial request (1B59) and should be used to terminate the browse routine and indicate the type of error with the string contained in the 1BD0 message.

Browse Error
[0x1BD0][ Packet Data Length : 2 ][ "WinMX " : 6 ][ User IP & Port  ASCII : 12 ][ 00 :1 ][ UserName : S ][ 00 : 1 ][ Error Message  : S ][ 00 : 1 ]

Example 1 : No response from remote host
Example 2 : User offline or switched hosts

Actually sent: Brackets added for clarity.
[5A 1B][42 00][57 69 6E 4D 58 20 34 39 64 31 34 30 35 31 31 38 37 31][00][47 75 6D 64 72 6F 70 36 30 39 5F 32 31 38 38 34][00][4E 6F 20 72 65 73 70 6F 6E 73 65 20 66 72 6F 6D 20 72 65 6D 6F 74 65 20 68 6F 73 74 2E][00]

ASCII = �LB WinMX 49d140511871 Gumdrop609_21884  No response from remote host.  
 





I hope this has helped you understand the Secondary browsing sequence and how to utilise it correctly

©2005-2018 WinMXWorld.com. All rights reserved. Page last updated Fri Jul 27 2018