mirror of
https://github.com/godotengine/godot.git
synced 2025-12-08 06:09:55 +00:00
[MP] Add MultiplayerPeer disconnect_peer, close.
Update ENet, WebRTC, and WebSocket to support peer disconnection and unify the close function.
This commit is contained in:
parent
028db9f2b5
commit
39f3d9d59e
13 changed files with 188 additions and 201 deletions
|
|
@ -94,6 +94,8 @@ void MultiplayerPeer::_bind_methods() {
|
|||
ClassDB::bind_method(D_METHOD("get_packet_mode"), &MultiplayerPeer::get_packet_mode);
|
||||
|
||||
ClassDB::bind_method(D_METHOD("poll"), &MultiplayerPeer::poll);
|
||||
ClassDB::bind_method(D_METHOD("close"), &MultiplayerPeer::close);
|
||||
ClassDB::bind_method(D_METHOD("disconnect_peer", "peer", "force"), &MultiplayerPeer::disconnect_peer, DEFVAL(false));
|
||||
|
||||
ClassDB::bind_method(D_METHOD("get_connection_status"), &MultiplayerPeer::get_connection_status);
|
||||
ClassDB::bind_method(D_METHOD("get_unique_id"), &MultiplayerPeer::get_unique_id);
|
||||
|
|
@ -213,6 +215,8 @@ void MultiplayerPeerExtension::_bind_methods() {
|
|||
GDVIRTUAL_BIND(_get_packet_peer);
|
||||
GDVIRTUAL_BIND(_is_server);
|
||||
GDVIRTUAL_BIND(_poll);
|
||||
GDVIRTUAL_BIND(_close);
|
||||
GDVIRTUAL_BIND(_disconnect_peer, "p_peer", "p_force");
|
||||
GDVIRTUAL_BIND(_get_unique_id);
|
||||
GDVIRTUAL_BIND(_set_refuse_new_connections, "p_enable");
|
||||
GDVIRTUAL_BIND(_is_refusing_new_connections);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue