summaryrefslogtreecommitdiff
path: root/thirdparty/enet
diff options
context:
space:
mode:
authorFabio Alessandrelli <fabio.alessandrelli@gmail.com>2018-09-02 05:32:12 +0200
committerFabio Alessandrelli <fabio.alessandrelli@gmail.com>2018-09-12 15:56:16 +0200
commit1b99806b478b823ff04ad0e2538e211e55c037cb (patch)
tree3fecd85237e8883234d4af124cf9f3cb9d350f26 /thirdparty/enet
parentb4e3be7519d576cd341da5c8b36cd44ab4e13c45 (diff)
Unify PacketPeerUDP using NetSocket
Diffstat (limited to 'thirdparty/enet')
-rw-r--r--thirdparty/enet/godot.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/thirdparty/enet/godot.cpp b/thirdparty/enet/godot.cpp
index 177848f96b..6ba7cf0000 100644
--- a/thirdparty/enet/godot.cpp
+++ b/thirdparty/enet/godot.cpp
@@ -108,7 +108,7 @@ int enet_socket_bind(ENetSocket socket, const ENetAddress *address) {
ENetSocket enet_socket_create(ENetSocketType type) {
- PacketPeerUDP *socket = PacketPeerUDP::create();
+ PacketPeerUDP *socket = memnew(PacketPeerUDP);
socket->set_blocking_mode(false);
return socket;
@@ -151,7 +151,7 @@ int enet_socket_send(ENetSocket socket, const ENetAddress *address, const ENetBu
err = sock->put_packet((const uint8_t *)&w[0], size);
if (err != OK) {
- if (err == ERR_UNAVAILABLE) { // blocking call
+ if (err == ERR_BUSY) { // Blocking call
return 0;
}