summaryrefslogtreecommitdiff
path: root/core/io/packet_peer.h
diff options
context:
space:
mode:
authorRémi Verschelde <rverschelde@gmail.com>2022-09-01 23:51:35 +0200
committerRémi Verschelde <rverschelde@gmail.com>2022-09-01 23:51:35 +0200
commit4cca7bd97778dd01637ddb6fd3dbb32e6d37db0b (patch)
treeb47f76f640430bdda106074c6ebe73e95b66e6ce /core/io/packet_peer.h
parent005aac2dbe2ed590e30e85424100f016c6c65fd6 (diff)
parentfbbd3950c82195e4d1b7d681aea0a9bd2fa67f4b (diff)
Merge pull request #65212 from Faless/net/4.x_simplify_ext_bindings
Diffstat (limited to 'core/io/packet_peer.h')
-rw-r--r--core/io/packet_peer.h13
1 files changed, 6 insertions, 7 deletions
diff --git a/core/io/packet_peer.h b/core/io/packet_peer.h
index ec9d33aa5a..07045e62a6 100644
--- a/core/io/packet_peer.h
+++ b/core/io/packet_peer.h
@@ -35,6 +35,7 @@
#include "core/object/class_db.h"
#include "core/templates/ring_buffer.h"
+#include "core/extension/ext_wrappers.gen.inc"
#include "core/object/gdvirtual.gen.inc"
#include "core/object/script_language.h"
#include "core/variant/native_ptr.h"
@@ -84,16 +85,14 @@ protected:
static void _bind_methods();
public:
- virtual int get_available_packet_count() const override;
virtual Error get_packet(const uint8_t **r_buffer, int &r_buffer_size) override; ///< buffer is GONE after next get_packet
+ GDVIRTUAL2R(Error, _get_packet, GDNativeConstPtr<const uint8_t *>, GDNativePtr<int>);
+
virtual Error put_packet(const uint8_t *p_buffer, int p_buffer_size) override;
- virtual int get_max_packet_size() const override;
+ GDVIRTUAL2R(Error, _put_packet, GDNativeConstPtr<const uint8_t>, int);
- /* GDExtension */
- GDVIRTUAL0RC(int, _get_available_packet_count);
- GDVIRTUAL2R(int, _get_packet, GDNativeConstPtr<const uint8_t *>, GDNativePtr<int>);
- GDVIRTUAL2R(int, _put_packet, GDNativeConstPtr<const uint8_t>, int);
- GDVIRTUAL0RC(int, _get_max_packet_size);
+ EXBIND0RC(int, get_available_packet_count);
+ EXBIND0RC(int, get_max_packet_size);
};
class PacketPeerStream : public PacketPeer {