65 {
67 message_type;
69 con_msg_man_type;
70
71 con_msg_man_type::ptr manager = websocketpp::lib::make_shared<con_msg_man_type>();
72
74
78
79 std::random_device dev;
80
81
82
84
85 double m = 18094238402394.0824923;
86
87
88
89
90
91
92
93
94
95
96
97 std::cout << m << std::endl;
98
99 std::cout << "Random Gen" << std::endl;
100 {
101 boost::timer::auto_cpu_timer t;
102
103 input->get_raw_payload().replace(0,
foo,
foo,
'\0');
104 output->get_raw_payload().replace(0,
foo,
foo,
'\0');
105 }
106
107 std::cout << "Out of place accelerated" << std::endl;
108 {
109 boost::timer::auto_cpu_timer t;
110
112 }
113
116
117 input->get_raw_payload().replace(0,
foo,
foo,
'\0');
118 output->get_raw_payload().replace(0,
foo,
foo,
'\0');
119
120 std::cout << "In place accelerated" << std::endl;
121 {
122 boost::timer::auto_cpu_timer t;
123
125 }
126
129
130 input->get_raw_payload().replace(0,
foo,
foo,
'\0');
131 output->get_raw_payload().replace(0,
foo,
foo,
'\0');
132 std::cout << "Out of place byte by byte" << std::endl;
133 {
134 boost::timer::auto_cpu_timer t;
135
137 }
138
141
142 input->get_raw_payload().replace(0,
foo,
foo,
'\0');
143 output->get_raw_payload().replace(0,
foo,
foo,
'\0');
144 std::cout << "In place byte by byte" << std::endl;
145 {
146 boost::timer::auto_cpu_timer t;
147
149 }
150
153
154 input->get_raw_payload().replace(0,
foo,
foo,
'a');
155 output->get_raw_payload().replace(0,
foo,
foo,
'b');
156 std::cout << "Copy" << std::endl;
157 {
158 boost::timer::auto_cpu_timer t;
159
160 std::copy(input->get_raw_payload().begin(), input->get_raw_payload().end(), output->get_raw_payload().begin());
161 }
162
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200}
Represents a buffer for a single WebSocket message.
void byte_mask(input_iter b, input_iter e, output_iter o, masking_key_type const &key, size_t key_offset=0)
Byte by byte mask/unmask.
void word_mask_exact(uint8_t *input, uint8_t *output, size_t length, masking_key_type const &key)
Exact word aligned mask/unmask.
std::string to_hex(std::string const &input)
Convert std::string to ascii printed string of hex digits.
Four byte conversion union.