Skylicht Engine
Loading...
Searching...
No Matches
IWebsocket.h
1#pragma once
2
3#include "pch.h"
4
5#include <string>
6#include <functional>
7
8namespace Skylicht
9{
10 namespace Network
11 {
12 class IWebsocket
13 {
14 public:
15 std::function<void()> OnConnected;
16 std::function<void()> OnConnectFailed;
17
18 public:
19 IWebsocket();
20
21 virtual ~IWebsocket();
22
23 static IWebsocket* create();
24
25 virtual bool connect(const std::string& url, const std::string& origin) = 0;
26
27 virtual void send(const std::string& message) = 0;
28
29 virtual void poll(int timeout = 0) = 0;
30
31 virtual void dispatch(std::function<void(const std::string&)> callable) = 0;
32
33 virtual bool isClosed() = 0;
34 };
35 }
36}
Everything in the Skylicht Engine. You can start by looking at the topics.
Definition AudioDebugLog.h:29