Made some member functions const where appropriate.
This commit is contained in:
parent
4abe349158
commit
2469d730b1
2 changed files with 5 additions and 5 deletions
|
|
@ -72,11 +72,11 @@ namespace SimpleWeb {
|
|||
friend class ClientBase<socket_type>;
|
||||
|
||||
public:
|
||||
std::size_t size() noexcept {
|
||||
std::size_t size() const noexcept {
|
||||
return streambuf.size();
|
||||
}
|
||||
/// Convenience function to return content as a string.
|
||||
std::string string() noexcept {
|
||||
std::string string() const noexcept {
|
||||
return std::string(asio::buffers_begin(streambuf.data()), asio::buffers_end(streambuf.data()));
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -135,7 +135,7 @@ namespace SimpleWeb {
|
|||
}
|
||||
|
||||
public:
|
||||
std::size_t size() noexcept {
|
||||
std::size_t size() const noexcept {
|
||||
return streambuf->size();
|
||||
}
|
||||
|
||||
|
|
@ -209,11 +209,11 @@ namespace SimpleWeb {
|
|||
friend class ServerBase<socket_type>;
|
||||
|
||||
public:
|
||||
std::size_t size() noexcept {
|
||||
std::size_t size() const noexcept {
|
||||
return streambuf.size();
|
||||
}
|
||||
/// Convenience function to return content as std::string.
|
||||
std::string string() noexcept {
|
||||
std::string string() const noexcept {
|
||||
return std::string(asio::buffers_begin(streambuf.data()), asio::buffers_end(streambuf.data()));
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue