NNTP protocol: NetworkStream object buffer size 
Author Message
 NNTP protocol: NetworkStream object buffer size

Hi Group

I'M using the NetworkStream Object for reading the stream from a NNTP
command sent with TCPClient object.

The default size for the ReceiveBufferSize property of the stream is 8192.
I read the same number of bytes in my read loop, and the problem that occur,
is that the loop exit when there is no bytes to read in the stream (the loop
condition is "while iBytesRead > 0").  The problem is that the server does
not finished to send the data and after exiting the loop there is new data
available in the stream and my ReadStream function don't have all the data
returned by the server.

How can i be sure that i received the entire response before returning ?
Is there is a standard for NNTP (number of bytes to read, Receive buffer
size, etc) ?
I tried to read 256 bytes at the time but it's very slow when the response
text is large.
Increasing the number of bytes to read give better performance, but i'm not
sure if it's the right choice...

Most of the NNTP command response finished with a "." but not all, so i
can't rely on it.

Thanks for your help.

Sat, 30 Aug 2003 10:56:19 GMT  
 [ 1 post ] 

 Relevant Pages 

1. NNTP Protocol and C#

2. byte array buffer and NetworkStream problem

3. an nntp control or CSocket sample using nntp

4. I want to know size of H323 Protocol source

5. asynchronous pluggable protocol...IRequest object

6. Named pipes, overlapped write buffer size

7. CHttpRequestParams::Render buffer size check is off by one

8. CRegKey::QueryStringValue buffer size on failure

9. size of jump buffer

10. Estimating size of buffer needed by vsprintf

11. buffered file read size

12. Malloc from a buffer of unkown size?


Powered by phpBB® Forum Software