Gnutella Forums  

Go Back   Gnutella Forums > Gnutella News and Gnutelliums Forums > General Gnutella Development Discussion
Register FAQ The Twelve Commandments Members List Calendar Arcade Find the Best VPN Search Today's Posts Mark Forums Read

General Gnutella Development Discussion For general discussion about Gnutella development.


 
 
LinkBack Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #1 (permalink)  
Old March 3rd, 2009
Novicius
 
Join Date: January 8th, 2009
Posts: 3
CathalG is flying high
Default zlib inflate() never returns end of stream

Hi,

I am trying to inflate a negotiated deflated Gnutella TCP connection.

The way I am going about this is the following:

e.g. direction = client to server:

1. Append packet to buffered stream.
2. pass stream to inflate()
3. if returns 0 (Z_OK) (successfully begun inflating but not finished), wait for next packet
4. else if returns Z_STREAM_END, pass inflated stream to function to parse Gnutella message(s). clean out buffer.

I have gone through numerous deflated TCP connections with this method, but inflate() only ever returns 0 (Z_OK).
Therefore I never reach the end of stream, even though this TCP connection is finished with a handshake. So I am never able to parse the Gnutella content.

Am I going about this the correct way? If not, where am I going wrong? If I am, why do I never reach end of stream?

Any help would be appreciated.

Thanks ,

Cathal
Reply With Quote
 

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT -7. The time now is 02:03 AM.


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.