Skip to content

Commit

Permalink
Merge pull request #64877 from Faless/mp/4.x_enet_remote_addr
Browse files Browse the repository at this point in the history
  • Loading branch information
akien-mga authored Aug 26, 2022
2 parents ac7b511 + 426fe7e commit dc4193b
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 0 deletions.
12 changes: 12 additions & 0 deletions modules/enet/doc_classes/ENetPacketPeer.xml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,18 @@
Returns the number of channels allocated for communication with peer.
</description>
</method>
<method name="get_remote_address" qualifiers="const">
<return type="String" />
<description>
Returns the IP address of this peer.
</description>
</method>
<method name="get_remote_port" qualifiers="const">
<return type="int" />
<description>
Returns the remote port of this peer.
</description>
</method>
<method name="get_state" qualifiers="const">
<return type="int" enum="ENetPacketPeer.PeerState" />
<description>
Expand Down
2 changes: 2 additions & 0 deletions modules/enet/enet_packet_peer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -206,6 +206,8 @@ void ENetPacketPeer::_bind_methods() {
ClassDB::bind_method(D_METHOD("send", "channel", "packet", "flags"), &ENetPacketPeer::_send);
ClassDB::bind_method(D_METHOD("throttle_configure", "interval", "acceleration", "deceleration"), &ENetPacketPeer::throttle_configure);
ClassDB::bind_method(D_METHOD("set_timeout", "timeout", "timeout_min", "timeout_max"), &ENetPacketPeer::set_timeout);
ClassDB::bind_method(D_METHOD("get_remote_address"), &ENetPacketPeer::get_remote_address);
ClassDB::bind_method(D_METHOD("get_remote_port"), &ENetPacketPeer::get_remote_port);
ClassDB::bind_method(D_METHOD("get_statistic", "statistic"), &ENetPacketPeer::get_statistic);
ClassDB::bind_method(D_METHOD("get_state"), &ENetPacketPeer::get_state);
ClassDB::bind_method(D_METHOD("get_channels"), &ENetPacketPeer::get_channels);
Expand Down

0 comments on commit dc4193b

Please sign in to comment.