Thanks for your reply.
Yes; if I wait until the TCP connection is terminated, then pass the incomplete inflated stream to a handler function: it does produce valid messages.
My next question is: how can I continuously process these messages without having to wait until the end of the connection?
i.e. Currently, if I pass the stream to a handler function after x packets (for example), the next time I call inflate() with the stream beginning at packet(x+1), it returns Z_STREAM_ERROR.
I assume this return value will result in an invalid inflated stream.
I hope I have explained this clearly enough.
Thanks for your help. |