Secondary Client - File Transfer Management



This chapter is to cover the management of file transfers, covering important areas such file request notification and que management.
The WinMX file-sharing system is controlled by the usage of transfer management packets, these are specific to the WinMX file-sharing system and would need to be incorporated into any relevant transfer control loops of a future client.

Heres a list of the transfer management packets.

0x1F41      Download Request File Indicator           - ( Secondary to Primary )
0x1F4A      Force Incoming Download Indicator         - ( Secondary to Primary)
0x1F54     Upload Fail Indicator                     - ( Secondary to Primary )
0x1F5E     Upload Que Status Request Indicator       - ( Secondary to Primary )
0x1F68      Upload Confirmation Indicator             - ( Secondary to Primary )
0x1FA4      Download/Que Failed/Busy Indicator        - ( Primary to Secondary )
0x1FAE      Upload Failed Indicator                   - ( Primary to Secondary )
0x1FB8      Upload Request Indicator                  - ( Primary to Secondary )
0x1FC2      Download Start Indicator                  - ( Primary to Secondary )
0x1FCC      Download "In Que" Indicator               - ( Primary to Secondary )
0x1FD6      Upload Start Indicator                    - ( Primary to Secondary )


This diagram provides a visual overview of the primary management aspect.




The Protocol used by each status packet is show below.


Download Request File Indicator - ( Secondary to Primary )
[ 0x1F41 ][ Packet Data Length : 2 ][ "WinMX" : 6 ][ User IP & Port  ASCII : 12 ][ 00 : 1 ][ UserName : S ][ 00 : 1 ][ FileName : S ][ 00 : 1 ][ Option : 1 ]  

 Option = 0x00 - Normal Request
 Option = 0x01 - Que Entry Request

 Note: Option value 01 is sent to join a que.


Force Incoming Download Indicator ( Secondary to Primary )
[ 0x1F4A ][ Packet Data Length : 2 ][ "WinMX" : 6 ][ User IP & Port  ASCII : 12 ][ 00 : 1 ][ UserName : S ][ 00 : 1 ][ FilePath&Name: N ][ 00 : 1 ]


Upload Fail Indicator - ( Secondary to Primary )
[ 0x1F54 ][ Packet Data Length : 2 ][ "WinMX" : 6 ][ User IP & Port  ASCII : 12 ][ 00 : 1 ][ UserName : S ][ 00 : 1 ][ FileName : N ][ 00 : 1 ][ Que position : 2 ][ X : 1 ][ 00 : 1 ]

The message  to be passed to the primary is indicated by the value at position " X", (actual message strings are NOT passed )
1)= "File not shared"
2) ="Busy (%d in queue)"



Upload Que Status Indicator - ( Secondary to Primary )
[ 0x1F5E ][ Packet Data Length : 2 ][ "WinMX" : 6 ][ User IP & Port  ASCII : 12 ][ 00 : 1 ][ UserName : S ][ 00 : 1 ][ FileName : N ][ 00 : 1 ][ Que position : 2 ][ X : 1 ][ 00 : 1 ]
 
X = 00


Upload Confirmation Packet (Not Qued)( Secondary to Primary )
[ 0x1F68 ][ Packet Data Length : 2 ][ "WinMX" : 6 ][ User IP & Port  ASCII : 12 ][ 00 : 1 ][ UserName : S ][ 00 : 1 ][ FileName : N ][ 00 : 1 ]


Download Failed/Busy indicator ( Primary to Secondary )
[ 0x1FA4 ][ Packet Data Length : 2 ][ "WinMX" : 6 ][ User IP & Port  ASCII : 12 ][ 00 : 1 ][ UserName : S ][ 00 : 1 ][ FileName : N ][ 00 : 1 ][ Status String : S ][ 00 : 1 ]

Status Strings (as indicated by 1F54 packet "x" value)  = "Busy ( % in queue)" , "Request timed out"


Upload Failed Indicator - ( Primary to Secondary )
[ 0x1FAE ][ Packet Data Length : 2 ][ "WinMX" : 6 ][ User IP & Port  ASCII : 12 ][ 00 : 1 ][ UserName : S ][ 00 : 1 ][ FileName : N ][ 00 : 1 ]


Upload Request  Indicator - ( Primary to Secondary )
[ 0x1FB8 ][ Packet Data Length : 2 ][ "WinMX" : 6 ][ User IP & Port  ASCII : 12 ][ 00 : 1 ][ UserName : S ][ 00 : 1 ][ FileName : N ][ 00 : 1 ][ LineType : 2 ][ Option : 1 ]

Option = 0x00 - Normal Request
Option = 0x01 - Que Entry Request


Download Start Indicator - ( Primary to Secondary )
[ 0x1FC2 ][ Packet Data Length : 2 ][ Requesting Nodes UserName  String : N ][ "WinMX" : 6 ][ User IP & Port  ASCII : 12 ][ 00 : 1 ][ UserName : S ][ 00 : 1 ]
[ FileName : N ][ 00 : 1 ][ IP Address : 4 ][ TCP Port : 2 ]

Download "In Que" Indicator - ( Primary to Secondary )
[ 0x1FCC ][ Packet Data Length : 2 ][ "WinMX" : 6 ][ User IP & Port  ASCII : 12 ][ 00 : 1 ][ UserName : S ][ 00 : 1 ][ FileName : N ][ 00 : 1 ][ Que Position Number In Hex : 2  ][ 00 : 2 ]


Upload Start Packet - ( Primary to Secondary )
[ 0x1FD6 ][ Packet Data Length : 2 ][ Local UserName : N ][ 00 : 1 ][ UserID : ? ][ 00 : 1 ][ UserName : S ][ 00 : 1 ][ FileName : N ][ 00 : 1 ][ IP Address : 4 ][ TCP Port  : 2 ]




: )

©2005-2024 WinMXWorld.com. All rights reserved. Page last updated Thu Jul 09 2009