Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Mar 18, 2011, 12:08:44 AM (14 years ago)
Author:
adrfried
Message:

Updated Enet to version 1.3.1

updated patch

File:
1 moved

Legend:

Unmodified
Added
Removed
  • code/trunk/src/external/enet/patches/0001-Add-IPv6-support-to-Enet.patch

    r8079 r8088  
    1 From 68e3ac1c2876aedb62a77fdc7ba71e4983a6b99d Mon Sep 17 00:00:00 2001
     1From 7a7274dad3f90d206e91c0712ea0d2599850b24e Mon Sep 17 00:00:00 2001
    22From: Adrian Friedli <adi@koalatux.ch>
    33Date: Thu, 2 Sep 2010 14:26:42 +0200
    4 Subject: [PATCH] IPv6 support
     4Subject: [PATCH] Add IPv6 support to Enet
    55
    66---
    77 host.c               |   57 +++++++---
    88 include/enet/enet.h  |   64 ++++++++---
    9  include/enet/win32.h |    5 +
     9 include/enet/win32.h |    4 +
    1010 protocol.c           |   73 ++++++++++--
    1111 unix.c               |  312 ++++++++++++++++++++++++++++++--------------------
    12  win32.c              |  245 ++++++++++++++++++++++++++--------------
    13  6 files changed, 506 insertions(+), 250 deletions(-)
     12 win32.c              |  247 ++++++++++++++++++++++++++--------------
     13 6 files changed, 507 insertions(+), 250 deletions(-)
     14 mode change 100755 => 100644 Doxyfile
     15 mode change 100755 => 100644 docs/FAQ.dox
     16 mode change 100755 => 100644 docs/design.dox
     17 mode change 100755 => 100644 docs/install.dox
     18 mode change 100755 => 100644 docs/license.dox
     19 mode change 100755 => 100644 docs/mainpage.dox
     20 mode change 100755 => 100644 docs/tutorial.dox
     21 mode change 100755 => 100644 enet.dsp
    1422
     23diff --git a/Doxyfile b/Doxyfile
     24old mode 100755
     25new mode 100644
     26diff --git a/docs/FAQ.dox b/docs/FAQ.dox
     27old mode 100755
     28new mode 100644
     29diff --git a/docs/design.dox b/docs/design.dox
     30old mode 100755
     31new mode 100644
     32diff --git a/docs/install.dox b/docs/install.dox
     33old mode 100755
     34new mode 100644
     35diff --git a/docs/license.dox b/docs/license.dox
     36old mode 100755
     37new mode 100644
     38diff --git a/docs/mainpage.dox b/docs/mainpage.dox
     39old mode 100755
     40new mode 100644
     41diff --git a/docs/tutorial.dox b/docs/tutorial.dox
     42old mode 100755
     43new mode 100644
     44diff --git a/enet.dsp b/enet.dsp
     45old mode 100755
     46new mode 100644
    1547diff --git a/host.c b/host.c
    1648index 8bb2433..a9d157b 100644
     
    107139          currentPeer < & host -> peers [host -> peerCount];
    108140diff --git a/include/enet/enet.h b/include/enet/enet.h
    109 index 2f656d6..7b468a0 100644
     141index b572590..8351166 100644
    110142--- a/include/enet/enet.h
    111143+++ b/include/enet/enet.h
     
    216248 ENET_API ENetPacket * enet_packet_create (const void *, size_t, enet_uint32);
    217249diff --git a/include/enet/win32.h b/include/enet/win32.h
    218 index 0e1cf0c..53a7ff7 100644
     250index 0e1cf0c..6145851 100644
    219251--- a/include/enet/win32.h
    220252+++ b/include/enet/win32.h
    221 @@ -14,6 +14,7 @@
    222  
    223  #include <stdlib.h>
    224  #include <winsock2.h>
    225 +#include <ws2tcpip.h>
    226  
    227  typedef SOCKET ENetSocket;
    228  
    229 @@ -53,6 +54,10 @@ typedef fd_set ENetSocketSet;
     253@@ -53,6 +53,10 @@ typedef fd_set ENetSocketSet;
    230254 #define ENET_SOCKETSET_REMOVE(sockset, socket) FD_CLEAR (socket, & (sockset))
    231255 #define ENET_SOCKETSET_CHECK(sockset, socket)  FD_ISSET (socket, & (sockset))
     
    239263 
    240264diff --git a/protocol.c b/protocol.c
    241 index 8e26dfb..cfef646 100644
     265index 2237ba8..7205d1b 100644
    242266--- a/protocol.c
    243267+++ b/protocol.c
     
    265289 enet_protocol_command_size (enet_uint8 commandNumber)
    266290 {
    267 @@ -262,9 +278,9 @@ enet_protocol_handle_connect (ENetHost * host, ENetProtocolHeader * header, ENet
     291@@ -266,9 +282,9 @@ enet_protocol_handle_connect (ENetHost * host, ENetProtocolHeader * header, ENet
    268292          ++ currentPeer)
    269293     {
     
    277301     }
    278302 
    279 @@ -848,10 +864,11 @@ enet_protocol_handle_incoming_commands (ENetHost * host, ENetEvent * event)
     303@@ -852,10 +868,11 @@ enet_protocol_handle_incoming_commands (ENetHost * host, ENetEvent * event)
    280304 
    281305        if (peer -> state == ENET_PEER_STATE_DISCONNECTED ||
     
    292316     }
    293317 
    294 @@ -891,8 +908,7 @@ enet_protocol_handle_incoming_commands (ENetHost * host, ENetEvent * event)
     318@@ -895,8 +912,7 @@ enet_protocol_handle_incoming_commands (ENetHost * host, ENetEvent * event)
    295319       
    296320     if (peer != NULL)
     
    302326     }
    303327     
    304 @@ -1021,7 +1037,7 @@ commandError:
     328@@ -1025,7 +1041,7 @@ commandError:
    305329 }
    306330 
     
    311335     for (;;)
    312336     {
    313 @@ -1031,10 +1047,11 @@ enet_protocol_receive_incoming_commands (ENetHost * host, ENetEvent * event)
     337@@ -1035,10 +1051,11 @@ enet_protocol_receive_incoming_commands (ENetHost * host, ENetEvent * event)
    314338        buffer.data = host -> packetData [0];
    315339        buffer.dataLength = sizeof (host -> packetData [0]);
     
    325349        if (receivedLength < 0)
    326350          return -1;
    327 @@ -1042,6 +1059,9 @@ enet_protocol_receive_incoming_commands (ENetHost * host, ENetEvent * event)
     351@@ -1046,6 +1063,9 @@ enet_protocol_receive_incoming_commands (ENetHost * host, ENetEvent * event)
    328352        if (receivedLength == 0)
    329353          return 0;
     
    335359        host -> receivedDataLength = receivedLength;
    336360       
    337 @@ -1373,6 +1393,9 @@ enet_protocol_send_outgoing_commands (ENetHost * host, ENetEvent * event, int ch
     361@@ -1397,6 +1417,9 @@ enet_protocol_send_outgoing_commands (ENetHost * host, ENetEvent * event, int ch
    338362          currentPeer < & host -> peers [host -> peerCount];
    339363          ++ currentPeer)
     
    345369             currentPeer -> state == ENET_PEER_STATE_ZOMBIE)
    346370           continue;
    347 @@ -1497,7 +1520,15 @@ enet_protocol_send_outgoing_commands (ENetHost * host, ENetEvent * event, int ch
     371@@ -1520,7 +1543,15 @@ enet_protocol_send_outgoing_commands (ENetHost * host, ENetEvent * event, int ch
    348372 
    349373         currentPeer -> lastSendTime = host -> serviceTime;
     
    362386         enet_protocol_remove_sent_unreliable_commands (currentPeer);
    363387 
    364 @@ -1608,7 +1639,23 @@ enet_host_service (ENetHost * host, ENetEvent * event, enet_uint32 timeout)
     388@@ -1631,7 +1662,23 @@ enet_host_service (ENetHost * host, ENetEvent * event, enet_uint32 timeout)
    365389           break;
    366390        }
     
    387411        case 1:
    388412           return 1;
    389 @@ -1660,7 +1707,7 @@ enet_host_service (ENetHost * host, ENetEvent * event, enet_uint32 timeout)
     413@@ -1683,7 +1730,7 @@ enet_host_service (ENetHost * host, ENetEvent * event, enet_uint32 timeout)
    390414 
    391415        waitCondition = ENET_SOCKET_WAIT_RECEIVE;
     
    874898 #endif
    875899diff --git a/win32.c b/win32.c
    876 index e1fae23..2607160 100644
     900index e1fae23..15b9888 100644
    877901--- a/win32.c
    878902+++ b/win32.c
    879 @@ -4,6 +4,8 @@
     903@@ -4,23 +4,27 @@
    880904 */
    881905 #ifdef WIN32
     
    884908+
    885909 #include <time.h>
     910+#include <ws2tcpip.h>
    886911 #define ENET_BUILDING_LIB 1
    887912 #include "enet/enet.h"
    888 @@ -13,14 +15,14 @@ static enet_uint32 timeBase = 0;
     913+#include <ws2tcpip.h>
     914 
     915 static enet_uint32 timeBase = 0;
     916 
    889917 int
    890918 enet_initialize (void)
     
    904932        WSACleanup ();
    905933       
    906 @@ -52,77 +54,139 @@ enet_time_set (enet_uint32 newTimeBase)
     934@@ -52,77 +56,139 @@ enet_time_set (enet_uint32 newTimeBase)
    907935     timeBase = (enet_uint32) timeGetTime () - newTimeBase;
    908936 }
     
    10841112 
    10851113 int
    1086 @@ -132,9 +196,10 @@ enet_socket_listen (ENetSocket socket, int backlog)
     1114@@ -132,9 +198,10 @@ enet_socket_listen (ENetSocket socket, int backlog)
    10871115 }
    10881116 
     
    10971125 
    10981126 int
    1099 @@ -173,28 +238,23 @@ enet_socket_set_option (ENetSocket socket, ENetSocketOption option, int value)
     1127@@ -173,28 +240,23 @@ enet_socket_set_option (ENetSocket socket, ENetSocketOption option, int value)
    11001128 }
    11011129 
     
    11341162 
    11351163     if (result == INVALID_SOCKET)
    1136 @@ -202,8 +262,7 @@ enet_socket_accept (ENetSocket socket, ENetAddress * address)
     1164@@ -202,8 +264,7 @@ enet_socket_accept (ENetSocket socket, ENetAddress * address)
    11371165 
    11381166     if (address != NULL)
     
    11441172 
    11451173     return result;
    1146 @@ -219,18 +278,15 @@ int
     1174@@ -219,18 +280,15 @@ int
    11471175 enet_socket_send (ENetSocket socket,
    11481176                   const ENetAddress * address,
     
    11671195 
    11681196     if (WSASendTo (socket,
    1169 @@ -239,7 +295,7 @@ enet_socket_send (ENetSocket socket,
     1197@@ -239,7 +297,7 @@ enet_socket_send (ENetSocket socket,
    11701198                    & sentLength,
    11711199                    0,
     
    11761204                    NULL) == SOCKET_ERROR)
    11771205     {
    1178 @@ -256,12 +312,13 @@ int
     1206@@ -256,12 +314,13 @@ int
    11791207 enet_socket_receive (ENetSocket socket,
    11801208                      ENetAddress * address,
     
    11931221     if (WSARecvFrom (socket,
    11941222                      (LPWSABUF) buffers,
    1195 @@ -288,8 +345,7 @@ enet_socket_receive (ENetSocket socket,
     1223@@ -288,8 +347,7 @@ enet_socket_receive (ENetSocket socket,
    11961224 
    11971225     if (address != NULL)
     
    12031231 
    12041232     return (int) recvLength;
    1205 @@ -307,25 +363,42 @@ enet_socketset_select (ENetSocket maxSocket, ENetSocketSet * readSet, ENetSocket
     1233@@ -307,25 +365,42 @@ enet_socketset_select (ENetSocket maxSocket, ENetSocketSet * readSet, ENetSocket
    12061234 }
    12071235 
     
    12521280     if (selectCount < 0)
    12531281       return -1;
    1254 @@ -335,14 +408,16 @@ enet_socket_wait (ENetSocket socket, enet_uint32 * condition, enet_uint32 timeou
     1282@@ -335,14 +410,16 @@ enet_socket_wait (ENetSocket socket, enet_uint32 * condition, enet_uint32 timeou
    12551283     if (selectCount == 0)
    12561284       return 0;
     
    12761304 
    12771305--
    1278 1.7.1
     13061.7.4.1
    12791307
Note: See TracChangeset for help on using the changeset viewer.