diff options
Diffstat (limited to 'modules/webrtc/webrtc_multiplayer.h')
-rw-r--r-- | modules/webrtc/webrtc_multiplayer.h | 39 |
1 files changed, 19 insertions, 20 deletions
diff --git a/modules/webrtc/webrtc_multiplayer.h b/modules/webrtc/webrtc_multiplayer.h index 0e1335b8a8..6b4ae6fcc8 100644 --- a/modules/webrtc/webrtc_multiplayer.h +++ b/modules/webrtc/webrtc_multiplayer.h @@ -5,8 +5,8 @@ /* GODOT ENGINE */ /* https://godotengine.org */ /*************************************************************************/ -/* Copyright (c) 2007-2020 Juan Linietsky, Ariel Manzur. */ -/* Copyright (c) 2014-2020 Godot Engine contributors (cf. AUTHORS.md). */ +/* Copyright (c) 2007-2021 Juan Linietsky, Ariel Manzur. */ +/* Copyright (c) 2014-2021 Godot Engine contributors (cf. AUTHORS.md). */ /* */ /* Permission is hereby granted, free of charge, to any person obtaining */ /* a copy of this software and associated documentation files (the */ @@ -35,7 +35,6 @@ #include "webrtc_peer_connection.h" class WebRTCMultiplayer : public NetworkedMultiplayerPeer { - GDCLASS(WebRTCMultiplayer, NetworkedMultiplayerPeer); protected: @@ -50,7 +49,6 @@ private: }; class ConnectedPeer : public Reference { - public: Ref<WebRTCPeerConnection> connection; List<Ref<WebRTCDataChannel>> channels; @@ -58,8 +56,9 @@ private: ConnectedPeer() { connected = false; - for (int i = 0; i < CH_RESERVED_MAX; i++) + for (int i = 0; i < CH_RESERVED_MAX; i++) { channels.push_front(Ref<WebRTCDataChannel>()); + } } }; @@ -90,27 +89,27 @@ public: void close(); // PacketPeer - Error get_packet(const uint8_t **r_buffer, int &r_buffer_size); ///< buffer is GONE after next get_packet - Error put_packet(const uint8_t *p_buffer, int p_buffer_size); - int get_available_packet_count() const; - int get_max_packet_size() const; + Error get_packet(const uint8_t **r_buffer, int &r_buffer_size) override; ///< buffer is GONE after next get_packet + Error put_packet(const uint8_t *p_buffer, int p_buffer_size) override; + int get_available_packet_count() const override; + int get_max_packet_size() const override; // NetworkedMultiplayerPeer - void set_transfer_mode(TransferMode p_mode); - TransferMode get_transfer_mode() const; - void set_target_peer(int p_peer_id); + void set_transfer_mode(TransferMode p_mode) override; + TransferMode get_transfer_mode() const override; + void set_target_peer(int p_peer_id) override; - int get_unique_id() const; - int get_packet_peer() const; + int get_unique_id() const override; + int get_packet_peer() const override; - bool is_server() const; + bool is_server() const override; - void poll(); + void poll() override; - void set_refuse_new_connections(bool p_enable); - bool is_refusing_new_connections() const; + void set_refuse_new_connections(bool p_enable) override; + bool is_refusing_new_connections() const override; - ConnectionStatus get_connection_status() const; + ConnectionStatus get_connection_status() const override; }; -#endif +#endif // WEBRTC_MULTIPLAYER_H |