changes for compiling on windows fixes #49

This commit is contained in:
Peter Thorson
2012-01-14 08:23:50 -06:00
parent d93eeabc4c
commit 2525de2545
5 changed files with 8 additions and 6 deletions

View File

@@ -57,7 +57,9 @@ uint64_t data::process_payload(std::istream& input,uint64_t size) {
}
if (new_size > m_payload.capacity()) {
m_payload.reserve(std::max(new_size,static_cast<uint64_t>(2*m_payload.capacity())));
m_payload.reserve(
std::max(new_size, static_cast<uint64_t>(2*m_payload.capacity()))
);
}
for (i = 0; i < size; ++i) {
@@ -101,7 +103,7 @@ void data::process_character(unsigned char c) {
m_payload.push_back(c);
}
void data::reset(frame::opcode::value opcode) {
void data::reset(websocketpp::frame::opcode::value opcode) {
m_opcode = opcode;
m_masking_index = M_NOT_MASKED;
m_payload.clear();

View File

@@ -152,7 +152,7 @@ public:
data(pool_ptr p, size_t s);
void reset(frame::opcode::value opcode);
void reset(websocketpp::frame::opcode::value opcode);
frame::opcode::value get_opcode() const;
const std::string& get_payload() const;

View File

@@ -97,7 +97,7 @@ void hybi_header::set_rsv2(bool b) {
void hybi_header::set_rsv3(bool b) {
set_header_bit(BPB0_RSV3,0,b);
}
void hybi_header::set_opcode(frame::opcode::value op) {
void hybi_header::set_opcode(websocketpp::frame::opcode::value op) {
m_header[0] &= (0xFF ^ BPB0_OPCODE); // clear op bits
m_header[0] |= op; // set op bits
}

View File

@@ -77,7 +77,7 @@ public:
void set_rsv1(bool b);
void set_rsv2(bool b);
void set_rsv3(bool b);
void set_opcode(frame::opcode::value op);
void set_opcode(websocketpp::frame::opcode::value op);
void set_masked(bool masked,int32_t key);
void set_payload_size(uint64_t size);
// Complete will throw a processor::exception in the case that the

View File

@@ -32,7 +32,7 @@
using websocketpp::boost_rng;
boost_rng::boost_rng() : m_gen(m_rng,
boost::random::uniform_int_distribution<>(INT32_MIN,INT32_MAX)); {}
boost::random::uniform_int_distribution<>(INT32_MIN,INT32_MAX)) {}
int32_t boost_rng::gen() {
return m_gen();