Send HEARTBEAT mesage from Godot
This commit is contained in:
parent
7890c90380
commit
f46887d6cc
3 changed files with 47 additions and 1 deletions
|
|
@ -2,6 +2,7 @@
|
|||
#define MARSHCONNECTOR_H
|
||||
|
||||
#include "godot_cpp/classes/node.hpp"
|
||||
#include "godot_cpp/classes/packet_peer_udp.hpp"
|
||||
#include "godot_cpp/classes/timer.hpp"
|
||||
|
||||
namespace godot {
|
||||
|
|
@ -12,6 +13,7 @@ class MarshConnector : public Node {
|
|||
private:
|
||||
double time_passed;
|
||||
Timer *heartbeat_timer;
|
||||
PacketPeerUDP *socket;
|
||||
|
||||
protected:
|
||||
static void _bind_methods();
|
||||
|
|
@ -20,6 +22,7 @@ public:
|
|||
MarshConnector();
|
||||
~MarshConnector();
|
||||
|
||||
void _ready() override;
|
||||
void _process(double delta) override;
|
||||
|
||||
void send_heartbeat();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue