Valhalla Legends Archive

Programming => Battle.net Bot Development => Topic started by: Barabajagal on February 19, 2008, 06:37 PM

Title: BNFTP v2
Post by: Barabajagal on February 19, 2008, 06:37 PM
Just wondering, but what the hell is the point in the message length WORD in version 2 of the File Transfer Protocol? It's always going to be 20 bytes. Nothing's dynamic length.... And the packet that is dynamic doesn't have a length!
Title: Re: BNFTP v2
Post by: Ringo on February 19, 2008, 07:06 PM
Blizzard implemented it, enough said :P
Probly back to back compatibility with v1, (cant remember if v1 has dword lengh or word tho, been awhile since i toyed with FTP protocol)
Title: Re: BNFTP v2
Post by: MyndFyre on February 19, 2008, 07:09 PM
Quote from: Andy on February 19, 2008, 06:37 PM
Just wondering, but what the hell is the point in the message length WORD in version 2 of the File Transfer Protocol? It's always going to be 20 bytes. Nothing's dynamic length.... And the packet that is dynamic doesn't have a length!

Good in case it ever changes.  Then the socket handler can read appropriate additional data without screwing up the stream.  Similar support is in the generic TLV (http://en.wikipedia.org/wiki/Type-length-value)-style protocols.
Title: Re: BNFTP v2
Post by: Ringo on February 19, 2008, 07:58 PM
Trubble is, 2nd C>S message doesnt have a lengh header, so could easily brake if the TCP stream broke up the message, unless they handle it with out needing a lengh header.
I would guess that having the lengh in the 1st message, works better for both versions of the protocol.
Who knows what goes through the head of the people who get payed to implement this stuff, sure they had a good reassion for doing it the way they did tho :P