#include <buffer.hpp>
Inheritance diagram for yaSSL::output_buffer:


Public Member Functions | |
| output_buffer () | |
| output_buffer (uint s) | |
| output_buffer (uint s, const byte *t, uint len) | |
| ~output_buffer () | |
| uint | get_size () const |
| uint | get_capacity () const |
| void | set_current (uint c) |
| void | allocate (uint s) |
| const byte * | get_buffer () const |
| byte & | operator[] (uint i) |
| bool | eof () |
| void | write (const byte *t, uint s) |
Private Member Functions | |
| output_buffer (const output_buffer &) | |
| output_buffer & | operator= (const output_buffer &) |
Private Attributes | |
| uint | current_ |
| byte * | buffer_ |
| byte * | end_ |
Definition at line 139 of file buffer.hpp.
| yaSSL::output_buffer::output_buffer | ( | ) |
| yaSSL::output_buffer::output_buffer | ( | uint | s | ) | [explicit] |
| yaSSL::output_buffer::~output_buffer | ( | ) |
Definition at line 219 of file buffer.cpp.
References buffer_, and yaSSL::ysArrayDelete().
00220 { 00221 ysArrayDelete(buffer_); 00222 }
Here is the call graph for this function:

| yaSSL::output_buffer::output_buffer | ( | const output_buffer & | ) | [private] |
| void yaSSL::output_buffer::allocate | ( | uint | s | ) |
Definition at line 245 of file buffer.cpp.
References assert, buffer_, end_, and NEW_YS.
Referenced by yaSSL::buildMessage(), and yaSSL::cipherFinished().
00246 { 00247 assert(!buffer_); // find realloc error 00248 buffer_ = NEW_YS byte[s]; end_ = buffer_ + s; 00249 }
Here is the caller graph for this function:

| bool yaSSL::output_buffer::eof | ( | ) |
Definition at line 270 of file buffer.cpp.
References current_, and get_capacity().
00271 { 00272 return current_ >= get_capacity(); 00273 }
Here is the call graph for this function:

| const byte * yaSSL::output_buffer::get_buffer | ( | ) | const |
Definition at line 253 of file buffer.cpp.
References buffer_.
Referenced by yaSSL::DH_Server::build(), yaSSL::buildMessage(), yaSSL::cipherFinished(), yaSSL::hashHandShake(), yaSSL::SSL::makeMasterSecret(), yaSSL::p_hash(), yaSSL::sendAlert(), yaSSL::sendClientHello(), and yaSSL::sendData().
00254 { 00255 return buffer_; 00256 }
Here is the caller graph for this function:

| uint yaSSL::output_buffer::get_capacity | ( | ) | const |
Definition at line 231 of file buffer.cpp.
Referenced by eof(), operator[](), yaSSL::p_hash(), set_current(), and write().
Here is the caller graph for this function:

| uint yaSSL::output_buffer::get_size | ( | ) | const |
Definition at line 225 of file buffer.cpp.
References current_.
Referenced by yaSSL::DH_Server::build(), yaSSL::buildMessage(), yaSSL::cipherFinished(), yaSSL::hashHandShake(), yaSSL::SSL::makeMasterSecret(), yaSSL::p_hash(), yaSSL::sendAlert(), yaSSL::sendClientHello(), and yaSSL::sendData().
00226 { 00227 return current_; 00228 }
Here is the caller graph for this function:

| output_buffer& yaSSL::output_buffer::operator= | ( | const output_buffer & | ) | [private] |
Definition at line 261 of file buffer.cpp.
References assert, yaSSL::AUTO, buffer_, yaSSL::Check::check(), current_, and get_capacity().
00262 { 00263 assert(i == AUTO); 00264 check(current_, get_capacity()); 00265 return buffer_[current_++]; 00266 }
Here is the call graph for this function:

| void yaSSL::output_buffer::set_current | ( | uint | c | ) |
Definition at line 237 of file buffer.cpp.
References yaSSL::Check::check(), current_, and get_capacity().
Referenced by yaSSL::buildMessage(), yaSSL::cipherFinished(), yaSSL::SSL::makeMasterSecret(), and yaSSL::PRF().
00238 { 00239 check(c, get_capacity()); 00240 current_ = c; 00241 }
Here is the call graph for this function:

Here is the caller graph for this function:

Definition at line 276 of file buffer.cpp.
References buffer_, yaSSL::Check::check(), current_, get_capacity(), and memcpy.
Referenced by yaSSL::DH_Server::build(), yaSSL::buildMessage(), yaSSL::cipherFinished(), yaSSL::SSL::makeMasterSecret(), yaSSL::operator<<(), output_buffer(), yaSSL::p_hash(), and yaSSL::PRF().
00277 { 00278 check(current_ + s - 1, get_capacity()); 00279 memcpy(&buffer_[current_], t, s); 00280 current_ += s; 00281 }
Here is the call graph for this function:

Here is the caller graph for this function:

byte* yaSSL::output_buffer::buffer_ [private] |
Definition at line 141 of file buffer.hpp.
Referenced by allocate(), get_buffer(), get_capacity(), operator[](), write(), and ~output_buffer().
uint yaSSL::output_buffer::current_ [private] |
Definition at line 140 of file buffer.hpp.
Referenced by eof(), get_size(), operator[](), set_current(), and write().
byte* yaSSL::output_buffer::end_ [private] |
1.4.7

