summaryrefslogtreecommitdiffstats
path: root/modules/enet/networked_multiplayer_enet.h
diff options
context:
space:
mode:
authorFabio Alessandrelli <fabio.alessandrelli@gmail.com>2018-04-10 17:52:10 +0200
committerFabio Alessandrelli <fabio.alessandrelli@gmail.com>2018-04-12 12:30:51 +0200
commit6b9ec810c6ccf096b0357ebf3f5fe6e3423d290b (patch)
tree4620c4da42243341d0343aa581ccecaf72402d63 /modules/enet/networked_multiplayer_enet.h
parent23fc8ca223acb7a2150a57280a3ddf9abac575e3 (diff)
downloadredot-engine-6b9ec810c6ccf096b0357ebf3f5fe6e3423d290b.tar.gz
Implement get_peer_[address|port] in ENet/WSServer
Also implement get_connected_host and get_connected_port in WebSocketPeer (not supported in HTML5 due to browser limitation). Add shorthand disconnect_peer(id) for get_peer(id)->close() like in ENet to WebSocketServer.
Diffstat (limited to 'modules/enet/networked_multiplayer_enet.h')
-rw-r--r--modules/enet/networked_multiplayer_enet.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/modules/enet/networked_multiplayer_enet.h b/modules/enet/networked_multiplayer_enet.h
index f93f24fd49..0e8dd67160 100644
--- a/modules/enet/networked_multiplayer_enet.h
+++ b/modules/enet/networked_multiplayer_enet.h
@@ -115,6 +115,9 @@ public:
virtual int get_packet_peer() const;
+ virtual IP_Address get_peer_address(int p_peer_id) const;
+ virtual int get_peer_port(int p_peer_id) const;
+
Error create_server(int p_port, int p_max_clients = 32, int p_in_bandwidth = 0, int p_out_bandwidth = 0);
Error create_client(const IP_Address &p_ip, int p_port, int p_in_bandwidth = 0, int p_out_bandwidth = 0);