Initial commit.

This commit is contained in:
Signal 2026-02-22 17:45:44 -05:00
commit cb0391ce80
56 changed files with 3485 additions and 0 deletions

View file

@ -0,0 +1,31 @@
#include "Network.h"
namespace Artifact {
void NetworkServer::host(NetworkClient * local) {
if (active) {
unhost();
}
active = true;
localClient = local;
listener = local->listen<Events::NetworkMessage>([](auto ev) {
});
}
void NetworkServer::unhost() {
active = false;
if (localClient) {
localClient->unlisten<Events::NetworkMessage>(listener);
localClient = nullptr;
} else if (server) {
server = nullptr;
}
}
void NetworkClient::connect(NetworkServer * local) {
localServer = local;
}
}