summaryrefslogtreecommitdiff
path: root/modules/gdnative
diff options
context:
space:
mode:
Diffstat (limited to 'modules/gdnative')
-rw-r--r--modules/gdnative/SCsub1
-rw-r--r--modules/gdnative/config.py5
-rw-r--r--modules/gdnative/doc_classes/MultiplayerPeerGDNative.xml9
-rw-r--r--modules/gdnative/doc_classes/PacketPeerGDNative.xml9
-rw-r--r--modules/gdnative/doc_classes/StreamPeerGDNative.xml9
-rw-r--r--modules/gdnative/doc_classes/WebRTCDataChannelGDNative.xml9
-rw-r--r--modules/gdnative/doc_classes/WebRTCPeerConnectionGDNative.xml9
-rw-r--r--modules/gdnative/gdnative_api.json91
-rw-r--r--modules/gdnative/gdnative_builders.py1
-rw-r--r--modules/gdnative/include/net/godot_net.h122
-rw-r--r--modules/gdnative/include/net/godot_webrtc.h123
-rw-r--r--modules/gdnative/net/SCsub12
-rw-r--r--modules/gdnative/net/multiplayer_peer_gdnative.cpp136
-rw-r--r--modules/gdnative/net/multiplayer_peer_gdnative.h79
-rw-r--r--modules/gdnative/net/packet_peer_gdnative.cpp72
-rw-r--r--modules/gdnative/net/packet_peer_gdnative.h59
-rw-r--r--modules/gdnative/net/register_types.cpp43
-rw-r--r--modules/gdnative/net/register_types.h37
-rw-r--r--modules/gdnative/net/stream_peer_gdnative.cpp77
-rw-r--r--modules/gdnative/net/stream_peer_gdnative.h60
-rw-r--r--modules/gdnative/net/webrtc_gdnative.cpp60
-rw-r--r--modules/gdnative/register_types.cpp3
22 files changed, 0 insertions, 1026 deletions
diff --git a/modules/gdnative/SCsub b/modules/gdnative/SCsub
index 21ee39f3ed..94bda04d12 100644
--- a/modules/gdnative/SCsub
+++ b/modules/gdnative/SCsub
@@ -16,7 +16,6 @@ env_gdnative.Prepend(CPPPATH=["#modules/gdnative/include/"])
Export("env_gdnative")
-SConscript("net/SCsub")
SConscript("pluginscript/SCsub")
SConscript("videodecoder/SCsub")
SConscript("text/SCsub")
diff --git a/modules/gdnative/config.py b/modules/gdnative/config.py
index fa985501b5..026a84a70f 100644
--- a/modules/gdnative/config.py
+++ b/modules/gdnative/config.py
@@ -10,14 +10,9 @@ def get_doc_classes():
return [
"GDNative",
"GDNativeLibrary",
- "MultiplayerPeerGDNative",
"NativeScript",
- "PacketPeerGDNative",
"PluginScript",
- "StreamPeerGDNative",
"VideoStreamGDNative",
- "WebRTCPeerConnectionGDNative",
- "WebRTCDataChannelGDNative",
]
diff --git a/modules/gdnative/doc_classes/MultiplayerPeerGDNative.xml b/modules/gdnative/doc_classes/MultiplayerPeerGDNative.xml
deleted file mode 100644
index 40f3121525..0000000000
--- a/modules/gdnative/doc_classes/MultiplayerPeerGDNative.xml
+++ /dev/null
@@ -1,9 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" ?>
-<class name="MultiplayerPeerGDNative" inherits="MultiplayerPeer" version="4.0">
- <brief_description>
- </brief_description>
- <description>
- </description>
- <tutorials>
- </tutorials>
-</class>
diff --git a/modules/gdnative/doc_classes/PacketPeerGDNative.xml b/modules/gdnative/doc_classes/PacketPeerGDNative.xml
deleted file mode 100644
index 32863f8422..0000000000
--- a/modules/gdnative/doc_classes/PacketPeerGDNative.xml
+++ /dev/null
@@ -1,9 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" ?>
-<class name="PacketPeerGDNative" inherits="PacketPeer" version="4.0">
- <brief_description>
- </brief_description>
- <description>
- </description>
- <tutorials>
- </tutorials>
-</class>
diff --git a/modules/gdnative/doc_classes/StreamPeerGDNative.xml b/modules/gdnative/doc_classes/StreamPeerGDNative.xml
deleted file mode 100644
index a505de2106..0000000000
--- a/modules/gdnative/doc_classes/StreamPeerGDNative.xml
+++ /dev/null
@@ -1,9 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" ?>
-<class name="StreamPeerGDNative" inherits="StreamPeer" version="4.0">
- <brief_description>
- </brief_description>
- <description>
- </description>
- <tutorials>
- </tutorials>
-</class>
diff --git a/modules/gdnative/doc_classes/WebRTCDataChannelGDNative.xml b/modules/gdnative/doc_classes/WebRTCDataChannelGDNative.xml
deleted file mode 100644
index ddf354763c..0000000000
--- a/modules/gdnative/doc_classes/WebRTCDataChannelGDNative.xml
+++ /dev/null
@@ -1,9 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" ?>
-<class name="WebRTCDataChannelGDNative" inherits="WebRTCDataChannel" version="4.0">
- <brief_description>
- </brief_description>
- <description>
- </description>
- <tutorials>
- </tutorials>
-</class>
diff --git a/modules/gdnative/doc_classes/WebRTCPeerConnectionGDNative.xml b/modules/gdnative/doc_classes/WebRTCPeerConnectionGDNative.xml
deleted file mode 100644
index 821779a0ff..0000000000
--- a/modules/gdnative/doc_classes/WebRTCPeerConnectionGDNative.xml
+++ /dev/null
@@ -1,9 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" ?>
-<class name="WebRTCPeerConnectionGDNative" inherits="WebRTCPeerConnection" version="4.0">
- <brief_description>
- </brief_description>
- <description>
- </description>
- <tutorials>
- </tutorials>
-</class>
diff --git a/modules/gdnative/gdnative_api.json b/modules/gdnative/gdnative_api.json
index 66d2dc267d..627883886c 100644
--- a/modules/gdnative/gdnative_api.json
+++ b/modules/gdnative/gdnative_api.json
@@ -5105,97 +5105,6 @@
]
},
{
- "name": "net",
- "type": "NET",
- "version": {
- "major": 4,
- "minor": 0
- },
- "next": null,
- "api": [
- {
- "name": "godot_net_bind_stream_peer",
- "return_type": "void",
- "arguments": [
- [
- "godot_object *",
- "p_obj"
- ],
- [
- "const godot_net_stream_peer *",
- "p_interface"
- ]
- ]
- },
- {
- "name": "godot_net_bind_packet_peer",
- "return_type": "void",
- "arguments": [
- [
- "godot_object *",
- "p_obj"
- ],
- [
- "const godot_net_packet_peer *",
- "p_interface"
- ]
- ]
- },
- {
- "name": "godot_net_bind_multiplayer_peer",
- "return_type": "void",
- "arguments": [
- [
- "godot_object *",
- "p_obj"
- ],
- [
- "const godot_net_multiplayer_peer *",
- "p_interface"
- ]
- ]
- },
- {
- "name": "godot_net_set_webrtc_library",
- "return_type": "godot_error",
- "arguments": [
- [
- "const godot_net_webrtc_library *",
- "p_library"
- ]
- ]
- },
- {
- "name": "godot_net_bind_webrtc_peer_connection",
- "return_type": "void",
- "arguments": [
- [
- "godot_object *",
- "p_obj"
- ],
- [
- "const godot_net_webrtc_peer_connection *",
- "p_interface"
- ]
- ]
- },
- {
- "name": "godot_net_bind_webrtc_data_channel",
- "return_type": "void",
- "arguments": [
- [
- "godot_object *",
- "p_obj"
- ],
- [
- "const godot_net_webrtc_data_channel *",
- "p_interface"
- ]
- ]
- }
- ]
- },
- {
"name": "text",
"type": "TEXT",
"version": {
diff --git a/modules/gdnative/gdnative_builders.py b/modules/gdnative/gdnative_builders.py
index 181fd71b82..4986b173cf 100644
--- a/modules/gdnative/gdnative_builders.py
+++ b/modules/gdnative/gdnative_builders.py
@@ -20,7 +20,6 @@ def _build_gdnative_api_struct_header(api):
"#include <gdnative/gdnative.h>",
"#include <android/godot_android.h>",
"#include <nativescript/godot_nativescript.h>",
- "#include <net/godot_net.h>",
"#include <pluginscript/godot_pluginscript.h>",
"#include <videodecoder/godot_videodecoder.h>",
"#include <text/godot_text.h>",
diff --git a/modules/gdnative/include/net/godot_net.h b/modules/gdnative/include/net/godot_net.h
deleted file mode 100644
index 3fb7b9e1cc..0000000000
--- a/modules/gdnative/include/net/godot_net.h
+++ /dev/null
@@ -1,122 +0,0 @@
-/*************************************************************************/
-/* godot_net.h */
-/*************************************************************************/
-/* This file is part of: */
-/* GODOT ENGINE */
-/* https://godotengine.org */
-/*************************************************************************/
-/* 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 */
-/* "Software"), to deal in the Software without restriction, including */
-/* without limitation the rights to use, copy, modify, merge, publish, */
-/* distribute, sublicense, and/or sell copies of the Software, and to */
-/* permit persons to whom the Software is furnished to do so, subject to */
-/* the following conditions: */
-/* */
-/* The above copyright notice and this permission notice shall be */
-/* included in all copies or substantial portions of the Software. */
-/* */
-/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */
-/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */
-/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.*/
-/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */
-/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */
-/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */
-/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
-/*************************************************************************/
-
-#ifndef GODOT_NATIVENET_H
-#define GODOT_NATIVENET_H
-
-#include <gdnative/gdnative.h>
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-// For future versions of the API we should only add new functions at the end of the structure and use the
-// version info to detect whether a call is available
-
-// Use these to populate version in your plugin
-#define GODOT_NET_API_MAJOR 3
-#define GODOT_NET_API_MINOR 1
-
-typedef struct {
- godot_gdnative_api_version version; /* version of our API */
- godot_object *data; /* User reference */
-
- /* This is StreamPeer */
- godot_error (*get_data)(void *user, uint8_t *p_buffer, int p_bytes);
- godot_error (*get_partial_data)(void *user, uint8_t *p_buffer, int p_bytes, int *r_received);
- godot_error (*put_data)(void *user, const uint8_t *p_data, int p_bytes);
- godot_error (*put_partial_data)(void *user, const uint8_t *p_data, int p_bytes, int *r_sent);
-
- int (*get_available_bytes)(const void *user);
-
- void *next; /* For extension? */
-} godot_net_stream_peer;
-
-/* Binds a StreamPeerGDNative to the provided interface */
-void godot_net_bind_stream_peer(godot_object *p_obj, const godot_net_stream_peer *p_interface);
-
-typedef struct {
- godot_gdnative_api_version version; /* version of our API */
-
- godot_object *data; /* User reference */
-
- /* This is PacketPeer */
- godot_error (*get_packet)(void *, const uint8_t **, int *);
- godot_error (*put_packet)(void *, const uint8_t *, int);
- godot_int (*get_available_packet_count)(const void *);
- godot_int (*get_max_packet_size)(const void *);
-
- void *next; /* For extension? */
-} godot_net_packet_peer;
-
-/* Binds a PacketPeerGDNative to the provided interface */
-void GDAPI godot_net_bind_packet_peer(godot_object *p_obj, const godot_net_packet_peer *);
-
-typedef struct {
- godot_gdnative_api_version version; /* version of our API */
-
- godot_object *data; /* User reference */
-
- /* This is PacketPeer */
- godot_error (*get_packet)(void *, const uint8_t **, int *);
- godot_error (*put_packet)(void *, const uint8_t *, int);
- godot_int (*get_available_packet_count)(const void *);
- godot_int (*get_max_packet_size)(const void *);
-
- /* This is MultiplayerPeer */
- void (*set_transfer_channel)(void *, godot_int);
- godot_int (*get_transfer_channel)(void *);
- void (*set_transfer_mode)(void *, godot_int);
- godot_int (*get_transfer_mode)(const void *);
- // 0 = broadcast, 1 = server, <0 = all but abs(value)
- void (*set_target_peer)(void *, godot_int);
- godot_int (*get_packet_peer)(const void *);
- godot_bool (*is_server)(const void *);
- void (*poll)(void *);
- // Must be > 0, 1 is for server
- int32_t (*get_unique_id)(const void *);
- void (*set_refuse_new_connections)(void *, godot_bool);
- godot_bool (*is_refusing_new_connections)(const void *);
- godot_int (*get_connection_status)(const void *);
-
- void *next; /* For extension? Or maybe not... */
-} godot_net_multiplayer_peer;
-
-/* Binds a MultiplayerPeerGDNative to the provided interface */
-void GDAPI godot_net_bind_multiplayer_peer(godot_object *p_obj, const godot_net_multiplayer_peer *);
-
-#ifdef __cplusplus
-}
-#endif
-
-// WebRTC Bindings
-#include "net/godot_webrtc.h"
-
-#endif /* GODOT_NATIVENET_H */
diff --git a/modules/gdnative/include/net/godot_webrtc.h b/modules/gdnative/include/net/godot_webrtc.h
deleted file mode 100644
index 52006e56ec..0000000000
--- a/modules/gdnative/include/net/godot_webrtc.h
+++ /dev/null
@@ -1,123 +0,0 @@
-/*************************************************************************/
-/* godot_webrtc.h */
-/*************************************************************************/
-/* This file is part of: */
-/* GODOT ENGINE */
-/* https://godotengine.org */
-/*************************************************************************/
-/* 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 */
-/* "Software"), to deal in the Software without restriction, including */
-/* without limitation the rights to use, copy, modify, merge, publish, */
-/* distribute, sublicense, and/or sell copies of the Software, and to */
-/* permit persons to whom the Software is furnished to do so, subject to */
-/* the following conditions: */
-/* */
-/* The above copyright notice and this permission notice shall be */
-/* included in all copies or substantial portions of the Software. */
-/* */
-/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */
-/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */
-/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.*/
-/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */
-/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */
-/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */
-/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
-/*************************************************************************/
-
-#ifndef GODOT_NATIVEWEBRTC_H
-#define GODOT_NATIVEWEBRTC_H
-
-#include <gdnative/gdnative.h>
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#define GODOT_NET_WEBRTC_API_MAJOR 4
-#define GODOT_NET_WEBRTC_API_MINOR 0
-
-/* Library Interface (used to set default GDNative WebRTC implementation */
-typedef struct {
- godot_gdnative_api_version version; /* version of our API */
-
- /* Called when the library is unset as default interface via godot_net_set_webrtc_library */
- void (*unregistered)();
-
- /* Used by WebRTCPeerConnection create when GDNative is the default implementation. */
- /* Takes a pointer to WebRTCPeerConnectionGDNative, should bind and return OK, failure if binding was unsuccessful. */
- godot_error (*create_peer_connection)(godot_object *);
-
- void *next; /* For extension */
-} godot_net_webrtc_library;
-
-/* WebRTCPeerConnection interface */
-typedef struct {
- godot_gdnative_api_version version; /* version of our API */
-
- godot_object *data; /* User reference */
-
- /* This is WebRTCPeerConnection */
- godot_int (*get_connection_state)(const void *);
-
- godot_error (*initialize)(void *, const godot_dictionary *);
- godot_object *(*create_data_channel)(void *, const char *p_channel_name, const godot_dictionary *);
- godot_error (*create_offer)(void *);
- godot_error (*create_answer)(void *); /* unused for now, should be done automatically on set_local_description */
- godot_error (*set_remote_description)(void *, const char *, const char *);
- godot_error (*set_local_description)(void *, const char *, const char *);
- godot_error (*add_ice_candidate)(void *, const char *, int, const char *);
- godot_error (*poll)(void *);
- void (*close)(void *);
-
- void *next; /* For extension? */
-} godot_net_webrtc_peer_connection;
-
-/* WebRTCDataChannel interface */
-typedef struct {
- godot_gdnative_api_version version; /* version of our API */
-
- godot_object *data; /* User reference */
-
- /* This is PacketPeer */
- godot_error (*get_packet)(void *, const uint8_t **, int *);
- godot_error (*put_packet)(void *, const uint8_t *, int);
- godot_int (*get_available_packet_count)(const void *);
- godot_int (*get_max_packet_size)(const void *);
-
- /* This is WebRTCDataChannel */
- void (*set_write_mode)(void *, godot_int);
- godot_int (*get_write_mode)(const void *);
- bool (*was_string_packet)(const void *);
-
- godot_int (*get_ready_state)(const void *);
- const char *(*get_label)(const void *);
- bool (*is_ordered)(const void *);
- int (*get_id)(const void *);
- int (*get_max_packet_life_time)(const void *);
- int (*get_max_retransmits)(const void *);
- const char *(*get_protocol)(const void *);
- bool (*is_negotiated)(const void *);
- int (*get_buffered_amount)(const void *);
-
- godot_error (*poll)(void *);
- void (*close)(void *);
-
- void *next; /* For extension? */
-} godot_net_webrtc_data_channel;
-
-/* Set the default GDNative library */
-godot_error GDAPI godot_net_set_webrtc_library(const godot_net_webrtc_library *);
-/* Binds a WebRTCPeerConnectionGDNative to the provided interface */
-void GDAPI godot_net_bind_webrtc_peer_connection(godot_object *p_obj, const godot_net_webrtc_peer_connection *);
-/* Binds a WebRTCDataChannelGDNative to the provided interface */
-void GDAPI godot_net_bind_webrtc_data_channel(godot_object *p_obj, const godot_net_webrtc_data_channel *);
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif
diff --git a/modules/gdnative/net/SCsub b/modules/gdnative/net/SCsub
deleted file mode 100644
index b76500c003..0000000000
--- a/modules/gdnative/net/SCsub
+++ /dev/null
@@ -1,12 +0,0 @@
-#!/usr/bin/env python
-
-Import("env")
-Import("env_gdnative")
-
-env_net = env_gdnative.Clone()
-
-has_webrtc = env_net["module_webrtc_enabled"]
-if has_webrtc:
- env_net.Append(CPPDEFINES=["WEBRTC_GDNATIVE_ENABLED"])
-
-env_net.add_source_files(env.modules_sources, "*.cpp")
diff --git a/modules/gdnative/net/multiplayer_peer_gdnative.cpp b/modules/gdnative/net/multiplayer_peer_gdnative.cpp
deleted file mode 100644
index 575d5f5060..0000000000
--- a/modules/gdnative/net/multiplayer_peer_gdnative.cpp
+++ /dev/null
@@ -1,136 +0,0 @@
-/*************************************************************************/
-/* multiplayer_peer_gdnative.cpp */
-/*************************************************************************/
-/* This file is part of: */
-/* GODOT ENGINE */
-/* https://godotengine.org */
-/*************************************************************************/
-/* 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 */
-/* "Software"), to deal in the Software without restriction, including */
-/* without limitation the rights to use, copy, modify, merge, publish, */
-/* distribute, sublicense, and/or sell copies of the Software, and to */
-/* permit persons to whom the Software is furnished to do so, subject to */
-/* the following conditions: */
-/* */
-/* The above copyright notice and this permission notice shall be */
-/* included in all copies or substantial portions of the Software. */
-/* */
-/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */
-/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */
-/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.*/
-/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */
-/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */
-/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */
-/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
-/*************************************************************************/
-
-#include "multiplayer_peer_gdnative.h"
-
-MultiplayerPeerGDNative::MultiplayerPeerGDNative() {
- interface = nullptr;
-}
-
-MultiplayerPeerGDNative::~MultiplayerPeerGDNative() {
-}
-
-void MultiplayerPeerGDNative::set_native_multiplayer_peer(const godot_net_multiplayer_peer *p_interface) {
- interface = p_interface;
-}
-
-Error MultiplayerPeerGDNative::get_packet(const uint8_t **r_buffer, int &r_buffer_size) {
- ERR_FAIL_COND_V(interface == nullptr, ERR_UNCONFIGURED);
- return (Error)interface->get_packet(interface->data, r_buffer, &r_buffer_size);
-}
-
-Error MultiplayerPeerGDNative::put_packet(const uint8_t *p_buffer, int p_buffer_size) {
- ERR_FAIL_COND_V(interface == nullptr, ERR_UNCONFIGURED);
- return (Error)interface->put_packet(interface->data, p_buffer, p_buffer_size);
-}
-
-int MultiplayerPeerGDNative::get_max_packet_size() const {
- ERR_FAIL_COND_V(interface == nullptr, 0);
- return interface->get_max_packet_size(interface->data);
-}
-
-int MultiplayerPeerGDNative::get_available_packet_count() const {
- ERR_FAIL_COND_V(interface == nullptr, 0);
- return interface->get_available_packet_count(interface->data);
-}
-
-/* MultiplayerPeer */
-void MultiplayerPeerGDNative::set_transfer_channel(int p_channel) {
- ERR_FAIL_COND(interface == nullptr);
- return interface->set_transfer_channel(interface->data, p_channel);
-}
-
-int MultiplayerPeerGDNative::get_transfer_channel() const {
- ERR_FAIL_COND_V(interface == nullptr, 0);
- return interface->get_transfer_channel(interface->data);
-}
-
-void MultiplayerPeerGDNative::set_transfer_mode(Multiplayer::TransferMode p_mode) {
- ERR_FAIL_COND(interface == nullptr);
- interface->set_transfer_mode(interface->data, (godot_int)p_mode);
-}
-
-Multiplayer::TransferMode MultiplayerPeerGDNative::get_transfer_mode() const {
- ERR_FAIL_COND_V(interface == nullptr, Multiplayer::TRANSFER_MODE_UNRELIABLE);
- return (Multiplayer::TransferMode)interface->get_transfer_mode(interface->data);
-}
-
-void MultiplayerPeerGDNative::set_target_peer(int p_peer_id) {
- ERR_FAIL_COND(interface == nullptr);
- interface->set_target_peer(interface->data, p_peer_id);
-}
-
-int MultiplayerPeerGDNative::get_packet_peer() const {
- ERR_FAIL_COND_V(interface == nullptr, 0);
- return interface->get_packet_peer(interface->data);
-}
-
-bool MultiplayerPeerGDNative::is_server() const {
- ERR_FAIL_COND_V(interface == nullptr, false);
- return interface->is_server(interface->data);
-}
-
-void MultiplayerPeerGDNative::poll() {
- ERR_FAIL_COND(interface == nullptr);
- interface->poll(interface->data);
-}
-
-int MultiplayerPeerGDNative::get_unique_id() const {
- ERR_FAIL_COND_V(interface == nullptr, 0);
- return interface->get_unique_id(interface->data);
-}
-
-void MultiplayerPeerGDNative::set_refuse_new_connections(bool p_enable) {
- ERR_FAIL_COND(interface == nullptr);
- interface->set_refuse_new_connections(interface->data, p_enable);
-}
-
-bool MultiplayerPeerGDNative::is_refusing_new_connections() const {
- ERR_FAIL_COND_V(interface == nullptr, true);
- return interface->is_refusing_new_connections(interface->data);
-}
-
-MultiplayerPeer::ConnectionStatus MultiplayerPeerGDNative::get_connection_status() const {
- ERR_FAIL_COND_V(interface == nullptr, CONNECTION_DISCONNECTED);
- return (ConnectionStatus)interface->get_connection_status(interface->data);
-}
-
-void MultiplayerPeerGDNative::_bind_methods() {
- ADD_PROPERTY_DEFAULT("transfer_channel", 0);
- ADD_PROPERTY_DEFAULT("transfer_mode", Multiplayer::TRANSFER_MODE_UNRELIABLE);
- ADD_PROPERTY_DEFAULT("refuse_new_connections", true);
-}
-
-extern "C" {
-
-void GDAPI godot_net_bind_multiplayer_peer(godot_object *p_obj, const godot_net_multiplayer_peer *p_impl) {
- ((MultiplayerPeerGDNative *)p_obj)->set_native_multiplayer_peer(p_impl);
-}
-}
diff --git a/modules/gdnative/net/multiplayer_peer_gdnative.h b/modules/gdnative/net/multiplayer_peer_gdnative.h
deleted file mode 100644
index 33e424d284..0000000000
--- a/modules/gdnative/net/multiplayer_peer_gdnative.h
+++ /dev/null
@@ -1,79 +0,0 @@
-/*************************************************************************/
-/* multiplayer_peer_gdnative.h */
-/*************************************************************************/
-/* This file is part of: */
-/* GODOT ENGINE */
-/* https://godotengine.org */
-/*************************************************************************/
-/* 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 */
-/* "Software"), to deal in the Software without restriction, including */
-/* without limitation the rights to use, copy, modify, merge, publish, */
-/* distribute, sublicense, and/or sell copies of the Software, and to */
-/* permit persons to whom the Software is furnished to do so, subject to */
-/* the following conditions: */
-/* */
-/* The above copyright notice and this permission notice shall be */
-/* included in all copies or substantial portions of the Software. */
-/* */
-/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */
-/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */
-/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.*/
-/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */
-/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */
-/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */
-/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
-/*************************************************************************/
-
-#ifndef MULTIPLAYER_PEER_GDNATIVE_H
-#define MULTIPLAYER_PEER_GDNATIVE_H
-
-#include "core/multiplayer/multiplayer_peer.h"
-#include "modules/gdnative/gdnative.h"
-#include "modules/gdnative/include/net/godot_net.h"
-
-class MultiplayerPeerGDNative : public MultiplayerPeer {
- GDCLASS(MultiplayerPeerGDNative, MultiplayerPeer);
-
-protected:
- static void _bind_methods();
- const godot_net_multiplayer_peer *interface;
-
-public:
- MultiplayerPeerGDNative();
- ~MultiplayerPeerGDNative();
-
- /* Sets the interface implementation from GDNative */
- void set_native_multiplayer_peer(const godot_net_multiplayer_peer *p_impl);
-
- /* Specific to PacketPeer */
- virtual Error get_packet(const uint8_t **r_buffer, int &r_buffer_size) override;
- virtual Error put_packet(const uint8_t *p_buffer, int p_buffer_size) override;
- virtual int get_max_packet_size() const override;
- virtual int get_available_packet_count() const override;
-
- /* Specific to MultiplayerPeer */
- virtual void set_transfer_channel(int p_channel) override;
- virtual int get_transfer_channel() const override;
- virtual void set_transfer_mode(Multiplayer::TransferMode p_mode) override;
- virtual Multiplayer::TransferMode get_transfer_mode() const override;
- virtual void set_target_peer(int p_peer_id) override;
-
- virtual int get_packet_peer() const override;
-
- virtual bool is_server() const override;
-
- virtual void poll() override;
-
- virtual int get_unique_id() const override;
-
- virtual void set_refuse_new_connections(bool p_enable) override;
- virtual bool is_refusing_new_connections() const override;
-
- virtual ConnectionStatus get_connection_status() const override;
-};
-
-#endif // MULTIPLAYER_PEER_GDNATIVE_H
diff --git a/modules/gdnative/net/packet_peer_gdnative.cpp b/modules/gdnative/net/packet_peer_gdnative.cpp
deleted file mode 100644
index 3bcdfed8ff..0000000000
--- a/modules/gdnative/net/packet_peer_gdnative.cpp
+++ /dev/null
@@ -1,72 +0,0 @@
-/*************************************************************************/
-/* packet_peer_gdnative.cpp */
-/*************************************************************************/
-/* This file is part of: */
-/* GODOT ENGINE */
-/* https://godotengine.org */
-/*************************************************************************/
-/* 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 */
-/* "Software"), to deal in the Software without restriction, including */
-/* without limitation the rights to use, copy, modify, merge, publish, */
-/* distribute, sublicense, and/or sell copies of the Software, and to */
-/* permit persons to whom the Software is furnished to do so, subject to */
-/* the following conditions: */
-/* */
-/* The above copyright notice and this permission notice shall be */
-/* included in all copies or substantial portions of the Software. */
-/* */
-/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */
-/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */
-/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.*/
-/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */
-/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */
-/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */
-/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
-/*************************************************************************/
-
-#include "packet_peer_gdnative.h"
-
-PacketPeerGDNative::PacketPeerGDNative() {
- interface = nullptr;
-}
-
-PacketPeerGDNative::~PacketPeerGDNative() {
-}
-
-void PacketPeerGDNative::set_native_packet_peer(const godot_net_packet_peer *p_impl) {
- interface = p_impl;
-}
-
-void PacketPeerGDNative::_bind_methods() {
-}
-
-Error PacketPeerGDNative::get_packet(const uint8_t **r_buffer, int &r_buffer_size) {
- ERR_FAIL_COND_V(interface == nullptr, ERR_UNCONFIGURED);
- return (Error)interface->get_packet(interface->data, r_buffer, &r_buffer_size);
-}
-
-Error PacketPeerGDNative::put_packet(const uint8_t *p_buffer, int p_buffer_size) {
- ERR_FAIL_COND_V(interface == nullptr, ERR_UNCONFIGURED);
- return (Error)interface->put_packet(interface->data, p_buffer, p_buffer_size);
-}
-
-int PacketPeerGDNative::get_max_packet_size() const {
- ERR_FAIL_COND_V(interface == nullptr, 0);
- return interface->get_max_packet_size(interface->data);
-}
-
-int PacketPeerGDNative::get_available_packet_count() const {
- ERR_FAIL_COND_V(interface == nullptr, 0);
- return interface->get_available_packet_count(interface->data);
-}
-
-extern "C" {
-
-void GDAPI godot_net_bind_packet_peer(godot_object *p_obj, const godot_net_packet_peer *p_impl) {
- ((PacketPeerGDNative *)p_obj)->set_native_packet_peer(p_impl);
-}
-}
diff --git a/modules/gdnative/net/packet_peer_gdnative.h b/modules/gdnative/net/packet_peer_gdnative.h
deleted file mode 100644
index 29013f9367..0000000000
--- a/modules/gdnative/net/packet_peer_gdnative.h
+++ /dev/null
@@ -1,59 +0,0 @@
-/*************************************************************************/
-/* packet_peer_gdnative.h */
-/*************************************************************************/
-/* This file is part of: */
-/* GODOT ENGINE */
-/* https://godotengine.org */
-/*************************************************************************/
-/* 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 */
-/* "Software"), to deal in the Software without restriction, including */
-/* without limitation the rights to use, copy, modify, merge, publish, */
-/* distribute, sublicense, and/or sell copies of the Software, and to */
-/* permit persons to whom the Software is furnished to do so, subject to */
-/* the following conditions: */
-/* */
-/* The above copyright notice and this permission notice shall be */
-/* included in all copies or substantial portions of the Software. */
-/* */
-/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */
-/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */
-/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.*/
-/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */
-/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */
-/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */
-/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
-/*************************************************************************/
-
-#ifndef PACKET_PEER_GDNATIVE_H
-#define PACKET_PEER_GDNATIVE_H
-
-#include "core/io/packet_peer.h"
-#include "modules/gdnative/gdnative.h"
-#include "modules/gdnative/include/net/godot_net.h"
-
-class PacketPeerGDNative : public PacketPeer {
- GDCLASS(PacketPeerGDNative, PacketPeer);
-
-protected:
- static void _bind_methods();
- const godot_net_packet_peer *interface;
-
-public:
- PacketPeerGDNative();
- ~PacketPeerGDNative();
-
- /* Sets the interface implementation from GDNative */
- void set_native_packet_peer(const godot_net_packet_peer *p_impl);
-
- /* Specific to PacketPeer */
- virtual Error get_packet(const uint8_t **r_buffer, int &r_buffer_size) override;
- virtual Error put_packet(const uint8_t *p_buffer, int p_buffer_size) override;
- virtual int get_max_packet_size() const override;
- virtual int get_available_packet_count() const override;
-};
-
-#endif // PACKET_PEER_GDNATIVE_H
diff --git a/modules/gdnative/net/register_types.cpp b/modules/gdnative/net/register_types.cpp
deleted file mode 100644
index 46c383e5ae..0000000000
--- a/modules/gdnative/net/register_types.cpp
+++ /dev/null
@@ -1,43 +0,0 @@
-/*************************************************************************/
-/* register_types.cpp */
-/*************************************************************************/
-/* This file is part of: */
-/* GODOT ENGINE */
-/* https://godotengine.org */
-/*************************************************************************/
-/* 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 */
-/* "Software"), to deal in the Software without restriction, including */
-/* without limitation the rights to use, copy, modify, merge, publish, */
-/* distribute, sublicense, and/or sell copies of the Software, and to */
-/* permit persons to whom the Software is furnished to do so, subject to */
-/* the following conditions: */
-/* */
-/* The above copyright notice and this permission notice shall be */
-/* included in all copies or substantial portions of the Software. */
-/* */
-/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */
-/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */
-/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.*/
-/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */
-/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */
-/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */
-/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
-/*************************************************************************/
-
-#include "register_types.h"
-#include "multiplayer_peer_gdnative.h"
-#include "packet_peer_gdnative.h"
-#include "stream_peer_gdnative.h"
-
-void register_net_types() {
- GDREGISTER_CLASS(MultiplayerPeerGDNative);
- GDREGISTER_CLASS(PacketPeerGDNative);
- GDREGISTER_CLASS(StreamPeerGDNative);
-}
-
-void unregister_net_types() {
-}
diff --git a/modules/gdnative/net/register_types.h b/modules/gdnative/net/register_types.h
deleted file mode 100644
index c99c6f6fbf..0000000000
--- a/modules/gdnative/net/register_types.h
+++ /dev/null
@@ -1,37 +0,0 @@
-/*************************************************************************/
-/* register_types.h */
-/*************************************************************************/
-/* This file is part of: */
-/* GODOT ENGINE */
-/* https://godotengine.org */
-/*************************************************************************/
-/* 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 */
-/* "Software"), to deal in the Software without restriction, including */
-/* without limitation the rights to use, copy, modify, merge, publish, */
-/* distribute, sublicense, and/or sell copies of the Software, and to */
-/* permit persons to whom the Software is furnished to do so, subject to */
-/* the following conditions: */
-/* */
-/* The above copyright notice and this permission notice shall be */
-/* included in all copies or substantial portions of the Software. */
-/* */
-/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */
-/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */
-/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.*/
-/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */
-/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */
-/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */
-/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
-/*************************************************************************/
-
-#ifndef NET_REGISTER_TYPES_H
-#define NET_REGISTER_TYPES_H
-
-void register_net_types();
-void unregister_net_types();
-
-#endif // NET_REGISTER_TYPES_H
diff --git a/modules/gdnative/net/stream_peer_gdnative.cpp b/modules/gdnative/net/stream_peer_gdnative.cpp
deleted file mode 100644
index 72ab72323d..0000000000
--- a/modules/gdnative/net/stream_peer_gdnative.cpp
+++ /dev/null
@@ -1,77 +0,0 @@
-/*************************************************************************/
-/* stream_peer_gdnative.cpp */
-/*************************************************************************/
-/* This file is part of: */
-/* GODOT ENGINE */
-/* https://godotengine.org */
-/*************************************************************************/
-/* 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 */
-/* "Software"), to deal in the Software without restriction, including */
-/* without limitation the rights to use, copy, modify, merge, publish, */
-/* distribute, sublicense, and/or sell copies of the Software, and to */
-/* permit persons to whom the Software is furnished to do so, subject to */
-/* the following conditions: */
-/* */
-/* The above copyright notice and this permission notice shall be */
-/* included in all copies or substantial portions of the Software. */
-/* */
-/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */
-/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */
-/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.*/
-/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */
-/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */
-/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */
-/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
-/*************************************************************************/
-
-#include "stream_peer_gdnative.h"
-
-StreamPeerGDNative::StreamPeerGDNative() {
- interface = nullptr;
-}
-
-StreamPeerGDNative::~StreamPeerGDNative() {
-}
-
-void StreamPeerGDNative::set_native_stream_peer(const godot_net_stream_peer *p_interface) {
- interface = p_interface;
-}
-
-void StreamPeerGDNative::_bind_methods() {
-}
-
-Error StreamPeerGDNative::put_data(const uint8_t *p_data, int p_bytes) {
- ERR_FAIL_COND_V(interface == nullptr, ERR_UNCONFIGURED);
- return (Error)(interface->put_data(interface->data, p_data, p_bytes));
-}
-
-Error StreamPeerGDNative::put_partial_data(const uint8_t *p_data, int p_bytes, int &r_sent) {
- ERR_FAIL_COND_V(interface == nullptr, ERR_UNCONFIGURED);
- return (Error)(interface->put_partial_data(interface->data, p_data, p_bytes, &r_sent));
-}
-
-Error StreamPeerGDNative::get_data(uint8_t *p_buffer, int p_bytes) {
- ERR_FAIL_COND_V(interface == nullptr, ERR_UNCONFIGURED);
- return (Error)(interface->get_data(interface->data, p_buffer, p_bytes));
-}
-
-Error StreamPeerGDNative::get_partial_data(uint8_t *p_buffer, int p_bytes, int &r_received) {
- ERR_FAIL_COND_V(interface == nullptr, ERR_UNCONFIGURED);
- return (Error)(interface->get_partial_data(interface->data, p_buffer, p_bytes, &r_received));
-}
-
-int StreamPeerGDNative::get_available_bytes() const {
- ERR_FAIL_COND_V(interface == nullptr, 0);
- return interface->get_available_bytes(interface->data);
-}
-
-extern "C" {
-
-void GDAPI godot_net_bind_stream_peer(godot_object *p_obj, const godot_net_stream_peer *p_interface) {
- ((StreamPeerGDNative *)p_obj)->set_native_stream_peer(p_interface);
-}
-}
diff --git a/modules/gdnative/net/stream_peer_gdnative.h b/modules/gdnative/net/stream_peer_gdnative.h
deleted file mode 100644
index dd5abceb83..0000000000
--- a/modules/gdnative/net/stream_peer_gdnative.h
+++ /dev/null
@@ -1,60 +0,0 @@
-/*************************************************************************/
-/* stream_peer_gdnative.h */
-/*************************************************************************/
-/* This file is part of: */
-/* GODOT ENGINE */
-/* https://godotengine.org */
-/*************************************************************************/
-/* 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 */
-/* "Software"), to deal in the Software without restriction, including */
-/* without limitation the rights to use, copy, modify, merge, publish, */
-/* distribute, sublicense, and/or sell copies of the Software, and to */
-/* permit persons to whom the Software is furnished to do so, subject to */
-/* the following conditions: */
-/* */
-/* The above copyright notice and this permission notice shall be */
-/* included in all copies or substantial portions of the Software. */
-/* */
-/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */
-/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */
-/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.*/
-/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */
-/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */
-/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */
-/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
-/*************************************************************************/
-
-#ifndef STREAM_PEER_GDNATIVE_H
-#define STREAM_PEER_GDNATIVE_H
-
-#include "core/io/stream_peer.h"
-#include "modules/gdnative/gdnative.h"
-#include "modules/gdnative/include/net/godot_net.h"
-
-class StreamPeerGDNative : public StreamPeer {
- GDCLASS(StreamPeerGDNative, StreamPeer);
-
-protected:
- static void _bind_methods();
- const godot_net_stream_peer *interface;
-
-public:
- StreamPeerGDNative();
- ~StreamPeerGDNative();
-
- /* Sets the interface implementation from GDNative */
- void set_native_stream_peer(const godot_net_stream_peer *p_interface);
-
- /* Specific to StreamPeer */
- Error put_data(const uint8_t *p_data, int p_bytes) override;
- Error put_partial_data(const uint8_t *p_data, int p_bytes, int &r_sent) override;
- Error get_data(uint8_t *p_buffer, int p_bytes) override;
- Error get_partial_data(uint8_t *p_buffer, int p_bytes, int &r_received) override;
- int get_available_bytes() const override;
-};
-
-#endif // STREAM_PEER_GDNATIVE_H
diff --git a/modules/gdnative/net/webrtc_gdnative.cpp b/modules/gdnative/net/webrtc_gdnative.cpp
deleted file mode 100644
index 76ccbad009..0000000000
--- a/modules/gdnative/net/webrtc_gdnative.cpp
+++ /dev/null
@@ -1,60 +0,0 @@
-/*************************************************************************/
-/* webrtc_gdnative.cpp */
-/*************************************************************************/
-/* This file is part of: */
-/* GODOT ENGINE */
-/* https://godotengine.org */
-/*************************************************************************/
-/* 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 */
-/* "Software"), to deal in the Software without restriction, including */
-/* without limitation the rights to use, copy, modify, merge, publish, */
-/* distribute, sublicense, and/or sell copies of the Software, and to */
-/* permit persons to whom the Software is furnished to do so, subject to */
-/* the following conditions: */
-/* */
-/* The above copyright notice and this permission notice shall be */
-/* included in all copies or substantial portions of the Software. */
-/* */
-/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */
-/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */
-/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.*/
-/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */
-/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */
-/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */
-/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
-/*************************************************************************/
-
-#include "modules/gdnative/gdnative.h"
-#include "modules/gdnative/include/net/godot_net.h"
-
-#ifdef WEBRTC_GDNATIVE_ENABLED
-#include "modules/webrtc/webrtc_data_channel_gdnative.h"
-#include "modules/webrtc/webrtc_peer_connection_gdnative.h"
-#endif
-
-extern "C" {
-
-void GDAPI godot_net_bind_webrtc_peer_connection(godot_object *p_obj, const godot_net_webrtc_peer_connection *p_impl) {
-#ifdef WEBRTC_GDNATIVE_ENABLED
- ((WebRTCPeerConnectionGDNative *)p_obj)->set_native_webrtc_peer_connection(p_impl);
-#endif
-}
-
-void GDAPI godot_net_bind_webrtc_data_channel(godot_object *p_obj, const godot_net_webrtc_data_channel *p_impl) {
-#ifdef WEBRTC_GDNATIVE_ENABLED
- ((WebRTCDataChannelGDNative *)p_obj)->set_native_webrtc_data_channel(p_impl);
-#endif
-}
-
-godot_error GDAPI godot_net_set_webrtc_library(const godot_net_webrtc_library *p_lib) {
-#ifdef WEBRTC_GDNATIVE_ENABLED
- return (godot_error)WebRTCPeerConnectionGDNative::set_default_library(p_lib);
-#else
- return (godot_error)ERR_UNAVAILABLE;
-#endif
-}
-}
diff --git a/modules/gdnative/register_types.cpp b/modules/gdnative/register_types.cpp
index e4c2b20224..a4ab5663ef 100644
--- a/modules/gdnative/register_types.cpp
+++ b/modules/gdnative/register_types.cpp
@@ -35,7 +35,6 @@
#include "gdnative.h"
#include "nativescript/register_types.h"
-#include "net/register_types.h"
#include "pluginscript/register_types.h"
#include "videodecoder/register_types.h"
@@ -265,7 +264,6 @@ void register_gdnative_types() {
GDNativeCallRegistry::singleton->register_native_call_type("standard_varcall", cb_standard_varcall);
- register_net_types();
register_nativescript_types();
register_pluginscript_types();
register_videodecoder_types();
@@ -329,7 +327,6 @@ void unregister_gdnative_types() {
unregister_videodecoder_types();
unregister_pluginscript_types();
unregister_nativescript_types();
- unregister_net_types();
memdelete(GDNativeCallRegistry::singleton);