MCPcopy Create free account
hub / github.com/TzuHuanTai/RaspberryPi-WebRTC / main

Function main

test/test_websocket.cpp:3–26  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1#include "signaling/websocket_service.h"
2
3int main() {
4 Args args{
5 .uid = "test_device",
6 .ws_key = "",
7 .ws_host = "localhost",
8 .ws_room = "",
9 };
10
11 net::io_context ioc;
12
13 boost::asio::steady_timer timer(ioc, std::chrono::seconds(5));
14 timer.async_wait([&ioc](const boost::system::error_code &ec) {
15 if (!ec) {
16 std::cout << "no events in io_context" << std::endl;
17 ioc.stop();
18 }
19 });
20
21 auto ws_service = WebsocketService::Create(args, nullptr, ioc);
22 ws_service->Start();
23
24 ioc.run();
25 return 0;
26}

Callers

nothing calls this directly

Calls 3

runMethod · 0.80
stopMethod · 0.45
StartMethod · 0.45

Tested by

no test coverage detected