#include <HTTP_StreamPolicy.h>
Public Types | |
typedef STREAM_BUFFER::char_type | char_type |
Public Member Functions | |
FixedLengthStreamPolicyBase (std::streamsize length) | |
virtual | ~FixedLengthStreamPolicyBase () |
Protected Member Functions | |
virtual int | read_from_stream (char_type *buffer, std::streamsize length) |
virtual int | write_to_stream (const char_type *buffer, std::streamsize length) |
Private Attributes | |
std::streamsize | length_ |
std::streamsize | count_ |
Definition at line 33 of file HTTP_StreamPolicy.h.
typedef STREAM_BUFFER::char_type ACE::HTTP::FixedLengthStreamPolicyBase< STREAM_BUFFER >::char_type |
Reimplemented from ACE::HTTP::StreamPolicyBase< STREAM_BUFFER >.
Definition at line 37 of file HTTP_StreamPolicy.h.
ACE::HTTP::FixedLengthStreamPolicyBase< STREAM_BUFFER >::FixedLengthStreamPolicyBase | ( | std::streamsize | length | ) |
Definition at line 16 of file HTTP_StreamPolicy.cpp.
ACE::HTTP::FixedLengthStreamPolicyBase< STREAM_BUFFER >::~FixedLengthStreamPolicyBase | ( | ) | [virtual] |
Definition at line 24 of file HTTP_StreamPolicy.cpp.
{ }
int ACE::HTTP::FixedLengthStreamPolicyBase< STREAM_BUFFER >::read_from_stream | ( | char_type * | buffer, | |
std::streamsize | length | |||
) | [protected, virtual] |
Implements ACE::HTTP::StreamPolicyBase< STREAM_BUFFER >.
Definition at line 29 of file HTTP_StreamPolicy.cpp.
{ int n = 0; if (this->count_ < this->length_) { if (this->count_ + length > this->length_) length = this->length_ - this->count_; n = this->read_from_stream_i (buf, length); if (n > 0) this->count_ += n; } return n; }
int ACE::HTTP::FixedLengthStreamPolicyBase< STREAM_BUFFER >::write_to_stream | ( | const char_type * | buffer, | |
std::streamsize | length | |||
) | [protected, virtual] |
Implements ACE::HTTP::StreamPolicyBase< STREAM_BUFFER >.
Definition at line 45 of file HTTP_StreamPolicy.cpp.
{ int n = 0; if (this->count_ < this->length_) { if ((this->count_ + length) > this->length_) length = this->length_ - this->count_; n = this->write_to_stream_i (buf, length); if (n > 0) this->count_ += n; } return n; }
std::streamsize ACE::HTTP::FixedLengthStreamPolicyBase< STREAM_BUFFER >::count_ [private] |
Definition at line 49 of file HTTP_StreamPolicy.h.
std::streamsize ACE::HTTP::FixedLengthStreamPolicyBase< STREAM_BUFFER >::length_ [private] |
Definition at line 48 of file HTTP_StreamPolicy.h.