Wire Sysio Wire Sysion 1.0.0
Loading...
Searching...
No Matches
connection.cpp File Reference
#include <boost/test/unit_test.hpp>
#include <iostream>
#include <cstring>
#include <string>
#include <websocketpp/common/memory.hpp>
#include <websocketpp/error.hpp>
#include <websocketpp/transport/iostream/connection.hpp>
#include <websocketpp/concurrency/basic.hpp>
#include <websocketpp/logger/basic.hpp>
Include dependency graph for connection.cpp:

Go to the source code of this file.

Classes

struct  config
 
struct  stub_con
 

Macros

#define BOOST_TEST_MODULE   transport_iostream_connection
 

Typedefs

typedef websocketpp::transport::iostream::connection< configiostream_con
 

Functions

 BOOST_AUTO_TEST_CASE (const_methods)
 
 BOOST_AUTO_TEST_CASE (write_before_output_method_set)
 
 BOOST_AUTO_TEST_CASE (async_write_ostream)
 
websocketpp::lib::error_code write_handler (std::string &o, websocketpp::connection_hdl, char const *buf, size_t len)
 
websocketpp::lib::error_code vector_write_handler (std::string &o, websocketpp::connection_hdl, std::vector< websocketpp::transport::buffer > const &bufs)
 
websocketpp::lib::error_code write_handler_error (websocketpp::connection_hdl, char const *, size_t)
 
 BOOST_AUTO_TEST_CASE (async_write_handler)
 
 BOOST_AUTO_TEST_CASE (async_write_handler_error)
 
 BOOST_AUTO_TEST_CASE (async_write_vector_0_ostream)
 
 BOOST_AUTO_TEST_CASE (async_write_vector_0_write_handler)
 
 BOOST_AUTO_TEST_CASE (async_write_vector_1_ostream)
 
 BOOST_AUTO_TEST_CASE (async_write_vector_1_write_handler)
 
 BOOST_AUTO_TEST_CASE (async_write_vector_2_ostream)
 
 BOOST_AUTO_TEST_CASE (async_write_vector_2_write_handler)
 
 BOOST_AUTO_TEST_CASE (async_write_vector_2_vector_write_handler)
 
 BOOST_AUTO_TEST_CASE (async_read_at_least_too_much)
 
 BOOST_AUTO_TEST_CASE (async_read_at_least_double_read)
 
 BOOST_AUTO_TEST_CASE (async_read_at_least)
 
 BOOST_AUTO_TEST_CASE (async_read_at_least2)
 
void timer_callback_stub (websocketpp::lib::error_code const &)
 
 BOOST_AUTO_TEST_CASE (set_timer)
 
 BOOST_AUTO_TEST_CASE (async_read_at_least_read_some)
 
 BOOST_AUTO_TEST_CASE (async_read_at_least_read_some_indef)
 
 BOOST_AUTO_TEST_CASE (async_read_at_least_read_all)
 
 BOOST_AUTO_TEST_CASE (eof_flag)
 
 BOOST_AUTO_TEST_CASE (fatal_error_flag)
 
 BOOST_AUTO_TEST_CASE (shutdown)
 
websocketpp::lib::error_code sd_handler (websocketpp::connection_hdl)
 
 BOOST_AUTO_TEST_CASE (shutdown_handler)
 
 BOOST_AUTO_TEST_CASE (shared_pointer_memory_cleanup)
 

Variables

config::alog_type alogger
 
config::elog_type elogger
 

Macro Definition Documentation

◆ BOOST_TEST_MODULE

#define BOOST_TEST_MODULE   transport_iostream_connection

Definition at line 28 of file connection.cpp.

Typedef Documentation

◆ iostream_con

Function Documentation

◆ BOOST_AUTO_TEST_CASE() [1/25]

BOOST_AUTO_TEST_CASE ( async_read_at_least )

Definition at line 410 of file connection.cpp.

410 {
411 stub_con::ptr con(new stub_con(true,alogger,elogger));
412
413 char buf[10];
414
415 memset(buf,'x',10);
416
417 con->async_read_at_least(5,buf,10);
418 BOOST_CHECK_EQUAL( con->ec, make_error_code(websocketpp::error::test) );
419
420 std::stringstream channel;
421 channel << "abcd";
422 channel >> *con;
423 BOOST_CHECK_EQUAL( channel.tellg(), -1 );
424 BOOST_CHECK_EQUAL( con->ec, make_error_code(websocketpp::error::test) );
425
426 std::stringstream channel2;
427 channel2 << "e";
428 channel2 >> *con;
429 BOOST_CHECK_EQUAL( channel2.tellg(), -1 );
430 BOOST_CHECK( !con->ec );
431 BOOST_CHECK_EQUAL( std::string(buf,10), "abcdexxxxx" );
432
433 std::stringstream channel3;
434 channel3 << "f";
435 channel3 >> *con;
436 BOOST_CHECK_EQUAL( channel3.tellg(), 0 );
437 BOOST_CHECK( !con->ec );
438 BOOST_CHECK_EQUAL( std::string(buf,10), "abcdexxxxx" );
439 con->async_read_at_least(1,buf+5,5);
440 channel3 >> *con;
441 BOOST_CHECK_EQUAL( channel3.tellg(), -1 );
442 BOOST_CHECK( !con->ec );
443 BOOST_CHECK_EQUAL( std::string(buf,10), "abcdefxxxx" );
444}
@ test
Unit testing utility error code.
Definition error.hpp:96
websocketpp::lib::shared_ptr< type > ptr
config::alog_type alogger
config::elog_type elogger
uint8_t buf[2048]
memset(pInfo->slotDescription, ' ', 64)
Here is the call graph for this function:

◆ BOOST_AUTO_TEST_CASE() [2/25]

BOOST_AUTO_TEST_CASE ( async_read_at_least2 )

Definition at line 446 of file connection.cpp.

446 {
447 stub_con::ptr con(new stub_con(true,alogger,elogger));
448
449 char buf[10];
450
451 memset(buf,'x',10);
452
453 con->async_read_at_least(5,buf,5);
454 BOOST_CHECK_EQUAL( con->ec, make_error_code(websocketpp::error::test) );
455
456 std::stringstream channel;
457 channel << "abcdefg";
458 channel >> *con;
459 BOOST_CHECK_EQUAL( channel.tellg(), 5 );
460 BOOST_CHECK( !con->ec );
461 BOOST_CHECK_EQUAL( std::string(buf,10), "abcdexxxxx" );
462
463 con->async_read_at_least(1,buf+5,5);
464 channel >> *con;
465 BOOST_CHECK_EQUAL( channel.tellg(), -1 );
466 BOOST_CHECK( !con->ec );
467 BOOST_CHECK_EQUAL( std::string(buf,10), "abcdefgxxx" );
468}
Here is the call graph for this function:

◆ BOOST_AUTO_TEST_CASE() [3/25]

BOOST_AUTO_TEST_CASE ( async_read_at_least_double_read )

Definition at line 400 of file connection.cpp.

400 {
401 stub_con::ptr con(new stub_con(true,alogger,elogger));
402
403 char buf[10];
404
405 con->async_read_at_least(5,buf,10);
406 con->async_read_at_least(5,buf,10);
407 BOOST_CHECK_EQUAL( con->ec, make_error_code(websocketpp::transport::iostream::error::double_read) );
408}
@ double_read
async_read called while another async_read was in progress
Definition base.hpp:74

◆ BOOST_AUTO_TEST_CASE() [4/25]

BOOST_AUTO_TEST_CASE ( async_read_at_least_read_all )

Definition at line 529 of file connection.cpp.

529 {
530 stub_con::ptr con(new stub_con(true,alogger,elogger));
531
532 char buf[20];
533 memset(buf,'x',20);
534
535 con->async_read_indef(5,buf,5);
536 BOOST_CHECK_EQUAL( con->ec, make_error_code(websocketpp::error::test) );
537
538 char input[11] = "aaaaabbbbb";
539 BOOST_CHECK_EQUAL(con->read_all(input,10), 10);
540 BOOST_CHECK( !con->ec );
541 BOOST_CHECK_EQUAL( std::string(buf,10), "bbbbbxxxxx" );
542 BOOST_CHECK_EQUAL( con->indef_read_total, 10 );
543}
Here is the call graph for this function:

◆ BOOST_AUTO_TEST_CASE() [5/25]

BOOST_AUTO_TEST_CASE ( async_read_at_least_read_some )

Definition at line 480 of file connection.cpp.

480 {
481 stub_con::ptr con(new stub_con(true,alogger,elogger));
482
483 char buf[10];
484 memset(buf,'x',10);
485
486 con->async_read_at_least(5,buf,5);
487 BOOST_CHECK_EQUAL( con->ec, make_error_code(websocketpp::error::test) );
488
489 char input[10] = "abcdefg";
490 BOOST_CHECK_EQUAL(con->read_some(input,5), 5);
491 BOOST_CHECK( !con->ec );
492 BOOST_CHECK_EQUAL( std::string(buf,10), "abcdexxxxx" );
493
494 BOOST_CHECK_EQUAL(con->read_some(input+5,2), 0);
495 BOOST_CHECK( !con->ec );
496 BOOST_CHECK_EQUAL( std::string(buf,10), "abcdexxxxx" );
497
498 con->async_read_at_least(1,buf+5,5);
499 BOOST_CHECK_EQUAL(con->read_some(input+5,2), 2);
500 BOOST_CHECK( !con->ec );
501 BOOST_CHECK_EQUAL( std::string(buf,10), "abcdefgxxx" );
502}
Here is the call graph for this function:

◆ BOOST_AUTO_TEST_CASE() [6/25]

BOOST_AUTO_TEST_CASE ( async_read_at_least_read_some_indef )

Definition at line 504 of file connection.cpp.

504 {
505 stub_con::ptr con(new stub_con(true,alogger,elogger));
506
507 char buf[20];
508 memset(buf,'x',20);
509
510 con->async_read_indef(5,buf,5);
511 BOOST_CHECK_EQUAL( con->ec, make_error_code(websocketpp::error::test) );
512
513 // here we expect to return early from read some because the outstanding
514 // read was for 5 bytes and we were called with 10.
515 char input[11] = "aaaaabbbbb";
516 BOOST_CHECK_EQUAL(con->read_some(input,10), 5);
517 BOOST_CHECK( !con->ec );
518 BOOST_CHECK_EQUAL( std::string(buf,10), "aaaaaxxxxx" );
519 BOOST_CHECK_EQUAL( con->indef_read_total, 5 );
520
521 // A subsequent read should read 5 more because the indef read refreshes
522 // itself. The new read will start again at the beginning of the buffer.
523 BOOST_CHECK_EQUAL(con->read_some(input+5,5), 5);
524 BOOST_CHECK( !con->ec );
525 BOOST_CHECK_EQUAL( std::string(buf,10), "bbbbbxxxxx" );
526 BOOST_CHECK_EQUAL( con->indef_read_total, 10 );
527}
Here is the call graph for this function:

◆ BOOST_AUTO_TEST_CASE() [7/25]

BOOST_AUTO_TEST_CASE ( async_read_at_least_too_much )

Definition at line 391 of file connection.cpp.

391 {
392 stub_con::ptr con(new stub_con(true,alogger,elogger));
393
394 char buf[10];
395
396 con->async_read_at_least(11,buf,10);
397 BOOST_CHECK_EQUAL( con->ec, make_error_code(websocketpp::transport::iostream::error::invalid_num_bytes) );
398}
@ invalid_num_bytes
async_read_at_least call requested more bytes than buffer can store
Definition base.hpp:71

◆ BOOST_AUTO_TEST_CASE() [8/25]

BOOST_AUTO_TEST_CASE ( async_write_handler )

Definition at line 219 of file connection.cpp.

219 {
220 stub_con::ptr con(new stub_con(true,alogger,elogger));
221 std::string output;
222
223 con->set_write_handler(websocketpp::lib::bind(
225 websocketpp::lib::ref(output),
226 websocketpp::lib::placeholders::_1,
227 websocketpp::lib::placeholders::_2,
228 websocketpp::lib::placeholders::_3
229 ));
230 con->write("foo");
231 BOOST_CHECK( !con->ec );
232 BOOST_CHECK_EQUAL(output, "foo");
233}
websocketpp::lib::error_code write_handler(std::string &o, websocketpp::connection_hdl, char const *buf, size_t len)
Here is the call graph for this function:

◆ BOOST_AUTO_TEST_CASE() [9/25]

BOOST_AUTO_TEST_CASE ( async_write_handler_error )

Definition at line 235 of file connection.cpp.

235 {
236 stub_con::ptr con(new stub_con(true,alogger,elogger));
237
238 con->set_write_handler(&write_handler_error);
239 con->write("foo");
240 BOOST_CHECK_EQUAL( con->ec, make_error_code(websocketpp::transport::error::general) );
241}
websocketpp::lib::error_code write_handler_error(websocketpp::connection_hdl, char const *, size_t)
Here is the call graph for this function:

◆ BOOST_AUTO_TEST_CASE() [10/25]

BOOST_AUTO_TEST_CASE ( async_write_ostream )

Definition at line 188 of file connection.cpp.

188 {
189 stub_con::ptr con(new stub_con(true,alogger,elogger));
190
191 std::stringstream output;
192
193 con->register_ostream(&output);
194
195 con->write("foo");
196
197 BOOST_CHECK( !con->ec );
198 BOOST_CHECK_EQUAL( output.str(), "foo" );
199}

◆ BOOST_AUTO_TEST_CASE() [11/25]

BOOST_AUTO_TEST_CASE ( async_write_vector_0_ostream )

Definition at line 243 of file connection.cpp.

243 {
244 std::stringstream output;
245
246 stub_con::ptr con(new stub_con(true,alogger,elogger));
247 con->register_ostream(&output);
248
249 std::vector<websocketpp::transport::buffer> bufs;
250
251 con->write(bufs);
252
253 BOOST_CHECK( !con->ec );
254 BOOST_CHECK_EQUAL( output.str(), "" );
255}

◆ BOOST_AUTO_TEST_CASE() [12/25]

BOOST_AUTO_TEST_CASE ( async_write_vector_0_write_handler )

Definition at line 257 of file connection.cpp.

257 {
258 std::string output;
259
260 stub_con::ptr con(new stub_con(true,alogger,elogger));
261
262 con->set_write_handler(websocketpp::lib::bind(
264 websocketpp::lib::ref(output),
265 websocketpp::lib::placeholders::_1,
266 websocketpp::lib::placeholders::_2,
267 websocketpp::lib::placeholders::_3
268 ));
269
270 std::vector<websocketpp::transport::buffer> bufs;
271
272 con->write(bufs);
273
274 BOOST_CHECK( !con->ec );
275 BOOST_CHECK_EQUAL( output, "" );
276}
Here is the call graph for this function:

◆ BOOST_AUTO_TEST_CASE() [13/25]

BOOST_AUTO_TEST_CASE ( async_write_vector_1_ostream )

Definition at line 278 of file connection.cpp.

278 {
279 std::stringstream output;
280
281 stub_con::ptr con(new stub_con(true,alogger,elogger));
282 con->register_ostream(&output);
283
284 std::vector<websocketpp::transport::buffer> bufs;
285
286 std::string foo = "foo";
287
288 bufs.push_back(websocketpp::transport::buffer(foo.data(),foo.size()));
289
290 con->write(bufs);
291
292 BOOST_CHECK( !con->ec );
293 BOOST_CHECK_EQUAL( output.str(), "foo" );
294}
A simple utility buffer class.

◆ BOOST_AUTO_TEST_CASE() [14/25]

BOOST_AUTO_TEST_CASE ( async_write_vector_1_write_handler )

Definition at line 296 of file connection.cpp.

296 {
297 std::string output;
298
299 stub_con::ptr con(new stub_con(true,alogger,elogger));
300 con->set_write_handler(websocketpp::lib::bind(
302 websocketpp::lib::ref(output),
303 websocketpp::lib::placeholders::_1,
304 websocketpp::lib::placeholders::_2,
305 websocketpp::lib::placeholders::_3
306 ));
307
308 std::vector<websocketpp::transport::buffer> bufs;
309
310 std::string foo = "foo";
311
312 bufs.push_back(websocketpp::transport::buffer(foo.data(),foo.size()));
313
314 con->write(bufs);
315
316 BOOST_CHECK( !con->ec );
317 BOOST_CHECK_EQUAL( output, "foo" );
318}
Here is the call graph for this function:

◆ BOOST_AUTO_TEST_CASE() [15/25]

BOOST_AUTO_TEST_CASE ( async_write_vector_2_ostream )

Definition at line 320 of file connection.cpp.

320 {
321 std::stringstream output;
322
323 stub_con::ptr con(new stub_con(true,alogger,elogger));
324 con->register_ostream(&output);
325
326 std::vector<websocketpp::transport::buffer> bufs;
327
328 std::string foo = "foo";
329 std::string bar = "bar";
330
331 bufs.push_back(websocketpp::transport::buffer(foo.data(),foo.size()));
332 bufs.push_back(websocketpp::transport::buffer(bar.data(),bar.size()));
333
334 con->write(bufs);
335
336 BOOST_CHECK( !con->ec );
337 BOOST_CHECK_EQUAL( output.str(), "foobar" );
338}

◆ BOOST_AUTO_TEST_CASE() [16/25]

BOOST_AUTO_TEST_CASE ( async_write_vector_2_vector_write_handler )

Definition at line 366 of file connection.cpp.

366 {
367 std::string output;
368
369 stub_con::ptr con(new stub_con(true,alogger,elogger));
370 con->set_vector_write_handler(websocketpp::lib::bind(
372 websocketpp::lib::ref(output),
373 websocketpp::lib::placeholders::_1,
374 websocketpp::lib::placeholders::_2
375 ));
376
377 std::vector<websocketpp::transport::buffer> bufs;
378
379 std::string foo = "foo";
380 std::string bar = "bar";
381
382 bufs.push_back(websocketpp::transport::buffer(foo.data(),foo.size()));
383 bufs.push_back(websocketpp::transport::buffer(bar.data(),bar.size()));
384
385 con->write(bufs);
386
387 BOOST_CHECK( !con->ec );
388 BOOST_CHECK_EQUAL( output, "foobar" );
389}
websocketpp::lib::error_code vector_write_handler(std::string &o, websocketpp::connection_hdl, std::vector< websocketpp::transport::buffer > const &bufs)
Here is the call graph for this function:

◆ BOOST_AUTO_TEST_CASE() [17/25]

BOOST_AUTO_TEST_CASE ( async_write_vector_2_write_handler )

Definition at line 340 of file connection.cpp.

340 {
341 std::string output;
342
343 stub_con::ptr con(new stub_con(true,alogger,elogger));
344 con->set_write_handler(websocketpp::lib::bind(
346 websocketpp::lib::ref(output),
347 websocketpp::lib::placeholders::_1,
348 websocketpp::lib::placeholders::_2,
349 websocketpp::lib::placeholders::_3
350 ));
351
352 std::vector<websocketpp::transport::buffer> bufs;
353
354 std::string foo = "foo";
355 std::string bar = "bar";
356
357 bufs.push_back(websocketpp::transport::buffer(foo.data(),foo.size()));
358 bufs.push_back(websocketpp::transport::buffer(bar.data(),bar.size()));
359
360 con->write(bufs);
361
362 BOOST_CHECK( !con->ec );
363 BOOST_CHECK_EQUAL( output, "foobar" );
364}
Here is the call graph for this function:

◆ BOOST_AUTO_TEST_CASE() [18/25]

BOOST_AUTO_TEST_CASE ( const_methods )

Definition at line 170 of file connection.cpp.

170 {
172
173 BOOST_CHECK( !con->is_secure() );
174 BOOST_CHECK_EQUAL( con->get_remote_endpoint(), "iostream transport" );
175}
lib::shared_ptr< type > ptr
Type of a shared pointer to this connection transport component.
websocketpp::transport::iostream::connection< config > iostream_con

◆ BOOST_AUTO_TEST_CASE() [19/25]

BOOST_AUTO_TEST_CASE ( eof_flag )

Definition at line 545 of file connection.cpp.

545 {
546 stub_con::ptr con(new stub_con(true,alogger,elogger));
547 char buf[10];
548 con->async_read_at_least(5,buf,5);
549 BOOST_CHECK_EQUAL( con->ec, make_error_code(websocketpp::error::test) );
550 con->eof();
551 BOOST_CHECK_EQUAL( con->ec, make_error_code(websocketpp::transport::error::eof) );
552}

◆ BOOST_AUTO_TEST_CASE() [20/25]

BOOST_AUTO_TEST_CASE ( fatal_error_flag )

Definition at line 554 of file connection.cpp.

554 {
555 stub_con::ptr con(new stub_con(true,alogger,elogger));
556 char buf[10];
557 con->async_read_at_least(5,buf,5);
558 BOOST_CHECK_EQUAL( con->ec, make_error_code(websocketpp::error::test) );
559 con->fatal_error();
560 BOOST_CHECK_EQUAL( con->ec, make_error_code(websocketpp::transport::error::pass_through) );
561}
@ pass_through
underlying transport pass through

◆ BOOST_AUTO_TEST_CASE() [21/25]

BOOST_AUTO_TEST_CASE ( set_timer )

Definition at line 472 of file connection.cpp.

472 {
473 stub_con::ptr con(new stub_con(true,alogger,elogger));
474
475 stub_con::timer_ptr tp = con->set_timer(1000,timer_callback_stub);
476
477 BOOST_CHECK( !tp );
478}
iostream_con::timer_ptr timer_ptr
void timer_callback_stub(websocketpp::lib::error_code const &)
Here is the call graph for this function:

◆ BOOST_AUTO_TEST_CASE() [22/25]

BOOST_AUTO_TEST_CASE ( shared_pointer_memory_cleanup )

Definition at line 583 of file connection.cpp.

583 {
584 stub_con::ptr con(new stub_con(true,alogger,elogger));
585
586 BOOST_CHECK_EQUAL(con.use_count(), 1);
587
588 char buf[10];
589 memset(buf,'x',10);
590 con->async_read_at_least(5,buf,5);
591 BOOST_CHECK_EQUAL( con->ec, make_error_code(websocketpp::error::test) );
592 BOOST_CHECK_EQUAL(con.use_count(), 2);
593
594 char input[10] = "foo";
595 con->read_some(input,3);
596 BOOST_CHECK_EQUAL(con.use_count(), 2);
597
598 con->read_some(input,2);
599 BOOST_CHECK_EQUAL( std::string(buf,10), "foofoxxxxx" );
600 BOOST_CHECK_EQUAL(con.use_count(), 1);
601
602 con->async_read_at_least(5,buf,5);
603 BOOST_CHECK_EQUAL(con.use_count(), 2);
604
605 con->eof();
606 BOOST_CHECK_EQUAL( con->ec, make_error_code(websocketpp::transport::error::eof) );
607 BOOST_CHECK_EQUAL(con.use_count(), 1);
608}
Here is the call graph for this function:

◆ BOOST_AUTO_TEST_CASE() [23/25]

BOOST_AUTO_TEST_CASE ( shutdown )

Definition at line 563 of file connection.cpp.

563 {
564 stub_con::ptr con(new stub_con(true,alogger,elogger));
565 BOOST_CHECK_EQUAL( con->ec, make_error_code(websocketpp::error::test) );
566 con->shutdown();
567 BOOST_CHECK_EQUAL( con->ec, websocketpp::lib::error_code() );
568}

◆ BOOST_AUTO_TEST_CASE() [24/25]

BOOST_AUTO_TEST_CASE ( shutdown_handler )

Definition at line 574 of file connection.cpp.

574 {
575 stub_con::ptr con(new stub_con(true,alogger,elogger));
576
577 con->set_shutdown_handler(&sd_handler);
578 BOOST_CHECK_EQUAL( con->ec, make_error_code(websocketpp::error::test) );
579 con->shutdown();
580 BOOST_CHECK_EQUAL( con->ec, make_error_code(websocketpp::transport::error::general) );
581}
websocketpp::lib::error_code sd_handler(websocketpp::connection_hdl)
Here is the call graph for this function:

◆ BOOST_AUTO_TEST_CASE() [25/25]

BOOST_AUTO_TEST_CASE ( write_before_output_method_set )

Definition at line 177 of file connection.cpp.

177 {
178 stub_con::ptr con(new stub_con(true,alogger,elogger));
179
180 con->write("foo");
181 BOOST_CHECK( con->ec == make_error_code(websocketpp::transport::iostream::error::output_stream_required) );
182
183 std::vector<websocketpp::transport::buffer> bufs;
184 con->write(bufs);
185 BOOST_CHECK_EQUAL( con->ec, make_error_code(websocketpp::transport::iostream::error::output_stream_required) );
186}

◆ sd_handler()

websocketpp::lib::error_code sd_handler ( websocketpp::connection_hdl )

Definition at line 570 of file connection.cpp.

570 {
571 return make_error_code(websocketpp::transport::error::general);
572}
Here is the caller graph for this function:

◆ timer_callback_stub()

void timer_callback_stub ( websocketpp::lib::error_code const & )

Definition at line 470 of file connection.cpp.

470{}
Here is the caller graph for this function:

◆ vector_write_handler()

websocketpp::lib::error_code vector_write_handler ( std::string & o,
websocketpp::connection_hdl ,
std::vector< websocketpp::transport::buffer > const & bufs )

Definition at line 206 of file connection.cpp.

206 {
207 std::vector<websocketpp::transport::buffer>::const_iterator it;
208 for (it = bufs.begin(); it != bufs.end(); it++) {
209 o += std::string((*it).buf, (*it).len);
210 }
211
212 return websocketpp::lib::error_code();
213}
Here is the caller graph for this function:

◆ write_handler()

websocketpp::lib::error_code write_handler ( std::string & o,
websocketpp::connection_hdl ,
char const * buf,
size_t len )

Definition at line 201 of file connection.cpp.

201 {
202 o += std::string(buf,len);
203 return websocketpp::lib::error_code();
204}
size_t len
Here is the caller graph for this function:

◆ write_handler_error()

websocketpp::lib::error_code write_handler_error ( websocketpp::connection_hdl ,
char const * ,
size_t  )

Definition at line 215 of file connection.cpp.

215 {
216 return make_error_code(websocketpp::transport::error::general);
217}
Here is the caller graph for this function:

Variable Documentation

◆ alogger

config::alog_type alogger

Definition at line 167 of file connection.cpp.

◆ elogger

config::elog_type elogger

Definition at line 168 of file connection.cpp.