#include <HTTP_IOStream.h>


Public Types | |
| typedef StreamPolicyBase < StreamBuffer > | policy_type |
Public Member Functions | |
| StreamBuffer (std::iostream &stream, policy_type *policy=0) | |
| virtual | ~StreamBuffer () |
| virtual int | sync () |
Protected Types | |
| enum | { BUFFER_SIZE = 4096 } |
Protected Member Functions | |
| virtual int | read_from_stream (char *buffer, std::streamsize length) |
| virtual int | write_to_stream (const char *buffer, std::streamsize length) |
| virtual int | read_from_stream_i (char *buffer, std::streamsize length) |
| virtual int | write_to_stream_i (const char *buffer, std::streamsize length) |
Private Attributes | |
| std::iostream & | stream_ |
| policy_type * | policy_ |
Friends | |
| class | StreamPolicyBase< StreamBuffer > |
Definition at line 39 of file HTTP_IOStream.h.
Definition at line 43 of file HTTP_IOStream.h.
anonymous enum [protected] |
| ACE::HTTP::StreamBuffer::StreamBuffer | ( | std::iostream & | stream, | |
| StreamBuffer::policy_type * | policy = 0 | |||
| ) |
Definition at line 21 of file HTTP_IOStream.cpp.
: ACE::IOS::BufferedStreamBuffer (BUFFER_SIZE, std::ios::in | std::ios::out), stream_ (stream), policy_ (policy) { if (this->policy_) this->policy_->set_stream_buffer (this); }
| ACE::HTTP::StreamBuffer::~StreamBuffer | ( | ) | [virtual] |
Definition at line 31 of file HTTP_IOStream.cpp.
| int ACE::HTTP::StreamBuffer::read_from_stream | ( | char * | buffer, | |
| std::streamsize | length | |||
| ) | [protected, virtual] |
Definition at line 37 of file HTTP_IOStream.cpp.
{
if (this->policy_)
return this->policy_->read_from_stream (buffer, length);
else
return this->read_from_stream_i (buffer, length);
}
| int ACE::HTTP::StreamBuffer::read_from_stream_i | ( | char * | buffer, | |
| std::streamsize | length | |||
| ) | [protected, virtual] |
Definition at line 45 of file HTTP_IOStream.cpp.
{
this->stream_.read (buffer, length);
return ACE_Utils::truncate_cast<int> (this->stream_.gcount ());
}
| int ACE::HTTP::StreamBuffer::sync | ( | void | ) | [virtual] |
Reimplemented from ACE::IOS::BasicBufferedStreamBuffer< ACE_CHAR_T, TR >.
Definition at line 65 of file HTTP_IOStream.cpp.
{
if (ACE::IOS::BufferedStreamBuffer::sync () == -1)
return -1;
return this->stream_.sync ();
}
| int ACE::HTTP::StreamBuffer::write_to_stream | ( | const char * | buffer, | |
| std::streamsize | length | |||
| ) | [protected, virtual] |
Definition at line 51 of file HTTP_IOStream.cpp.
{
if (this->policy_)
return this->policy_->write_to_stream (buffer, length);
else
return this->write_to_stream_i (buffer, length);
}
| int ACE::HTTP::StreamBuffer::write_to_stream_i | ( | const char * | buffer, | |
| std::streamsize | length | |||
| ) | [protected, virtual] |
Definition at line 59 of file HTTP_IOStream.cpp.
{
this->stream_.write (buffer, length);
return this->stream_.good () ? ACE_Utils::truncate_cast<int> (length) : -1;
}
friend class StreamPolicyBase< StreamBuffer > [friend] |
Definition at line 51 of file HTTP_IOStream.h.
policy_type* ACE::HTTP::StreamBuffer::policy_ [private] |
Definition at line 68 of file HTTP_IOStream.h.
std::iostream& ACE::HTTP::StreamBuffer::stream_ [private] |
Definition at line 67 of file HTTP_IOStream.h.
1.7.0