By default make offline
This commit is contained in:
1 parent
1a7e424085
commit
67c0696061
6 files changed
+20
-17
No files matched your search
@@ -8,19 +8,11 @@ namespace ZL {
|
||||
}
|
||||
|
||||
void LocalClient::Poll() {
|
||||
|
||||
if (!messageQueue.empty()) {
|
||||
std::string msg = messageQueue.front();
|
||||
messageQueue.pop();
|
||||
std::cout << "LocalClient received message: " << msg << std::endl;
|
||||
}
|
||||
}
|
||||
|
||||
void LocalClient::Send(const std::string& message) {
|
||||
|
||||
if (message == "PING")
|
||||
{
|
||||
messageQueue.push("PONG");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
@@ -17,5 +17,9 @@ namespace ZL {
|
||||
|
||||
bool IsConnected() const override { return true; }
|
||||
int GetClientId() const { return 1; }
|
||||
|
||||
std::unordered_map<int, ClientStateInterval> getRemotePlayers() override {
|
||||
return std::unordered_map<int, ClientStateInterval>();
|
||||
}
|
||||
};
|
||||
}
|
||||
@@ -1,4 +1,6 @@
|
||||
#include "WebSocketClient.h"
|
||||
#ifdef NETWORK
|
||||
|
||||
#include "WebSocketClient.h"
|
||||
#include <iostream>
|
||||
#include <SDL2/SDL.h>
|
||||
|
||||
@@ -168,4 +170,6 @@ namespace ZL {
|
||||
}
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#endif
|
||||
@@ -1,5 +1,7 @@
|
||||
#pragma once
|
||||
|
||||
#ifdef NETWORK
|
||||
|
||||
// WebSocketClient.h
|
||||
#include "NetworkInterface.h"
|
||||
#include <queue>
|
||||
@@ -53,4 +55,5 @@ namespace ZL {
|
||||
return remotePlayers;
|
||||
}
|
||||
};
|
||||
}
|
||||
}
|
||||
#endif
|
||||
Reference in new issue
Block a user