LeviLamina
Loading...
Searching...
No Matches
HttpServer.h
1#pragma once
2
3#include "mc/_HeaderOutputPredefine.h"
4
5// auto generated inclusion list
6#include "mc/deps/core/threading/Async.h"
7#include "mc/deps/core/threading/TaskGroup.h"
8#include "mc/deps/nether_net/ContextProxy.h"
9#include "mc/external/sigslot/has_slots.h"
10#include "mc/external/sigslot/single_threaded.h"
11#include "mc/platform/Result.h"
12
13// auto generated forward declare list
14// clang-format off
15namespace NetherNet { class HttpConnection; }
16namespace NetherNet { struct HttpRequest; }
17namespace NetherNet { struct HttpResponse; }
18namespace webrtc { class Socket; }
19// clang-format on
20
21namespace NetherNet {
22
23class HttpServer : public ::NetherNet::ContextProxy, public ::sigslot::has_slots<::sigslot::single_threaded> {
24public:
25 // member variables
26 // NOLINTBEGIN
27 ::ll::TypedStorage<2, 2, ushort> mPort;
28 ::ll::TypedStorage<8, 32, ::std::string> mBindAddress;
29 ::ll::TypedStorage<8, 8, ::std::unique_ptr<::webrtc::Socket>> mListenSocket;
30 ::ll::TypedStorage<8, 24, ::std::vector<::std::shared_ptr<::NetherNet::HttpConnection>>> mConnections;
31 ::ll::TypedStorage<8, 336, ::TaskGroup> mTaskGroup;
32 // NOLINTEND
33
34public:
35 // virtual functions
36 // NOLINTBEGIN
37 virtual ~HttpServer() /*override*/ = default;
38
39 virtual ::Bedrock::Threading::Async<::Bedrock::Result<::NetherNet::HttpResponse>>
40 onRequest(::NetherNet::HttpRequest request) = 0;
41 // NOLINTEND
42
43public:
44 // member functions
45 // NOLINTBEGIN
46 MCAPI void _onConnectionClosed(::NetherNet::HttpConnection* conn);
47
48 MCAPI void _onListenReadEvent(::webrtc::Socket*);
49 // NOLINTEND
50};
51
52} // namespace NetherNet
Definition ContextProxy.h:18
Definition HttpConnection.h:23
Definition HttpServer.h:23
Definition has_slots.h:8
Definition Socket.h:12
Definition HttpRequest.h:7
Definition HttpResponse.h:10