Gnutella Forums

Gnutella Forums (https://www.gnutellaforums.com/)
-   General Gnutella Development Discussion (https://www.gnutellaforums.com/general-gnutella-development-discussion/)
-   -   Creating header struct (https://www.gnutellaforums.com/general-gnutella-development-discussion/10023-creating-header-struct.html)

Unregistered April 3rd, 2002 05:11 AM

Creating header struct
 
Hi.
I want to know if I understand.

To send a Descriptor header I must to do this struct:

string 16 characters (to Descriptor ID)
integer (to payload descriptor)
integer (to TTL)
integer (to HOPS)
long (to payload lenght)

Then I must to create a struct {

} containing this fields and send it to other servents, that´s correct?

Smilin' Joe Fission April 3rd, 2002 05:23 PM

Re: Creating header struct
 
Quote:

Originally posted by Unregistered
integer (to payload descriptor)
integer (to TTL)
integer (to HOPS)

If you plan on using this same struct to create headers from, then each of the above fields should not be declared as integers. They are each only one byte long whereas an integer is 2 bytes long. Declare them as either "char" or "BYTE" (if your compiler supports the latter) instead.

Unregistered April 4th, 2002 05:47 AM

Don't re-write the world. See Gnucleus or gtk-gnutella source code.

Unregistered April 4th, 2002 08:50 AM

Where can I find that source code?


All times are GMT -7. The time now is 12:56 PM.

Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2025, vBulletin Solutions, Inc.
SEO by vBSEO 3.6.0 ©2011, Crawlability, Inc.

Copyright © 2020 Gnutella Forums.
All Rights Reserved.