summaryrefslogtreecommitdiffstats
path: root/modules/enet/networked_multiplayer_enet.h
diff options
context:
space:
mode:
authorJuan Linietsky <reduzio@gmail.com>2016-08-14 18:49:50 -0300
committerJuan Linietsky <reduzio@gmail.com>2016-08-14 18:49:50 -0300
commit3db36684b183adbec93cce9fe91182186e389e06 (patch)
treea324f3a336d1a77e7e3bd3d3bfc7258ccf8b06b5 /modules/enet/networked_multiplayer_enet.h
parent01bdfe1ff6033c012d0833ee165f6055fed69724 (diff)
downloadredot-engine-3db36684b183adbec93cce9fe91182186e389e06.tar.gz
Added high level networked multiplayer to Godot.
It's complete, but absolutely and completely untested, undocumented and NSFW. Have fun :-)
Diffstat (limited to 'modules/enet/networked_multiplayer_enet.h')
-rw-r--r--modules/enet/networked_multiplayer_enet.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/modules/enet/networked_multiplayer_enet.h b/modules/enet/networked_multiplayer_enet.h
index 20eb53990d..ec6b084d66 100644
--- a/modules/enet/networked_multiplayer_enet.h
+++ b/modules/enet/networked_multiplayer_enet.h
@@ -52,10 +52,12 @@ public:
Error create_server(int p_port, int p_max_clients=32, int p_max_channels=1, int p_in_bandwidth=0, int p_out_bandwidth=0);
Error create_client(const IP_Address& p_ip,int p_port, int p_max_channels=1, int p_in_bandwidth=0, int p_out_bandwidth=0);
- void disconnect();
+ void close_connection();
virtual void poll();
+ virtual bool is_server() const;
+
virtual int get_available_packet_count() const;
virtual Error get_packet(const uint8_t **r_buffer,int &r_buffer_size) const; ///< buffer is GONE after next get_packet
virtual Error put_packet(const uint8_t *p_buffer,int p_buffer_size);