Added extension "deflate-frame". 46/2846/1
authorDavid Galeano <davidgaleano@turbulenz.biz>
Wed, 9 Jan 2013 10:21:33 +0000 (18:21 +0800)
committerKevron Rees <kevron_m_rees@linux.intel.com>
Thu, 7 Mar 2013 21:01:22 +0000 (13:01 -0800)
Using by default instead of "deflate-stream".

lib/Makefile.am
lib/extension-deflate-frame.c [new file with mode: 0644]
lib/extension-deflate-frame.h [new file with mode: 0644]
lib/extension.c
win32port/libwebsocketswin32/libwebsocketswin32.vcxproj
win32port/libwebsocketswin32/libwebsocketswin32.vcxproj.filters

index b6198b6..3b5f4fd 100644 (file)
@@ -8,6 +8,7 @@ dist_libwebsockets_la_SOURCES=libwebsockets.c \
                                client-handshake.c \
                                extension.c \
                                extension-deflate-stream.c extension-deflate-stream.h \
+                               extension-deflate-frame.c extension-deflate-frame.h\
                                private-libwebsockets.h
 
 
diff --git a/lib/extension-deflate-frame.c b/lib/extension-deflate-frame.c
new file mode 100644 (file)
index 0000000..09e2700
--- /dev/null
@@ -0,0 +1,205 @@
+#include "private-libwebsockets.h"
+#include "extension-deflate-frame.h"
+#include <stdio.h>
+#include <string.h>
+#include <assert.h>
+
+#define LWS_ZLIB_WINDOW_BITS 15
+#define LWS_ZLIB_MEMLEVEL 8
+
+int lws_extension_callback_deflate_frame(
+               struct libwebsocket_context *context,
+               struct libwebsocket_extension *ext,
+               struct libwebsocket *wsi,
+               enum libwebsocket_extension_callback_reasons reason,
+               void *user, void *in, size_t len)
+{
+       struct lws_ext_deflate_frame_conn *conn =
+                                        (struct lws_ext_deflate_frame_conn *)user;
+       struct lws_tokens *eff_buf = (struct lws_tokens *)in;
+       int n;
+
+       switch (reason) {
+
+       /*
+        * for deflate-frame, both client and server sides act the same
+        */
+
+       case LWS_EXT_CALLBACK_CLIENT_CONSTRUCT:
+       case LWS_EXT_CALLBACK_CONSTRUCT:
+               conn->zs_in.zalloc = conn->zs_out.zalloc = Z_NULL;
+               conn->zs_in.zfree = conn->zs_out.zfree = Z_NULL;
+               conn->zs_in.opaque = conn->zs_out.opaque = Z_NULL;
+               n = inflateInit2(&conn->zs_in, -LWS_ZLIB_WINDOW_BITS);
+               if (n != Z_OK) {
+                       lws_log(LWS_LOG_WARNING, "deflateInit returned %d", n);
+                       return 1;
+               }
+               n = deflateInit2(&conn->zs_out,
+                                DEFLATE_FRAME_COMPRESSION_LEVEL, Z_DEFLATED,
+                                -LWS_ZLIB_WINDOW_BITS, LWS_ZLIB_MEMLEVEL,
+                                                               Z_DEFAULT_STRATEGY);
+               if (n != Z_OK) {
+                       lws_log(LWS_LOG_WARNING, "deflateInit returned %d", n);
+                       return 1;
+               }
+               conn->buf_in_length = MAX_USER_RX_BUFFER;
+               conn->buf_out_length = MAX_USER_RX_BUFFER;
+               conn->compressed_out = 0;
+               conn->buf_in = (unsigned char *)malloc(LWS_SEND_BUFFER_PRE_PADDING +
+                                                                                          conn->buf_in_length +
+                                                                                          LWS_SEND_BUFFER_POST_PADDING);
+               conn->buf_out = (unsigned char *)malloc(LWS_SEND_BUFFER_PRE_PADDING +
+                                                                                               conn->buf_out_length +
+                                                                                               LWS_SEND_BUFFER_POST_PADDING);
+               lws_log(LWS_LOG_DEBUG, "zlibs constructed");
+               break;
+
+       case LWS_EXT_CALLBACK_DESTROY:
+               free(conn->buf_in);
+               free(conn->buf_out);
+               conn->buf_in_length = 0;
+               conn->buf_out_length = 0;
+               conn->compressed_out = 0;
+               (void)inflateEnd(&conn->zs_in);
+               (void)deflateEnd(&conn->zs_out);
+               lws_log(LWS_LOG_DEBUG, "zlibs destructed");
+               break;
+
+       case LWS_EXT_CALLBACK_PAYLOAD_RX:
+               if ((libwebsocket_get_reserved_bits(wsi) & 0x40) == 0)
+                       return 0;
+
+               /*
+                * inflate the incoming payload
+                */
+               conn->zs_in.next_in = (unsigned char *)eff_buf->token;
+               conn->zs_in.avail_in = eff_buf->token_len;
+
+               conn->zs_in.next_in[eff_buf->token_len + 0] = 0;
+               conn->zs_in.next_in[eff_buf->token_len + 1] = 0;
+               conn->zs_in.next_in[eff_buf->token_len + 2] = 0xff;
+               conn->zs_in.next_in[eff_buf->token_len + 3] = 0xff;
+               conn->zs_in.avail_in += 4;
+
+               conn->zs_in.next_out = conn->buf_in + LWS_SEND_BUFFER_PRE_PADDING;
+               conn->zs_in.avail_out = conn->buf_in_length;
+
+               while (1)
+               {
+                       n = inflate(&conn->zs_in, Z_SYNC_FLUSH);
+                       switch (n) {
+                       case Z_NEED_DICT:
+                       case Z_DATA_ERROR:
+                       case Z_MEM_ERROR:
+                               /*
+                                * screwed.. close the connection... we will get a
+                                * destroy callback to take care of closing nicely
+                                */
+                               lws_log(LWS_LOG_ERROR, "zlib error inflate %d: %s", n, conn->zs_in.msg);
+                               return -1;
+                       }
+
+                       if (conn->zs_in.avail_in > 0)
+                       {
+                               size_t len_so_far = (conn->zs_in.next_out - (conn->buf_in + LWS_SEND_BUFFER_PRE_PADDING));
+                               unsigned char *new_buf;
+                               conn->buf_in_length *= 2;
+                               new_buf = (unsigned char *)malloc(LWS_SEND_BUFFER_PRE_PADDING +
+                                                                                                 conn->buf_in_length +
+                                                                                                 LWS_SEND_BUFFER_POST_PADDING);
+                               memcpy(new_buf + LWS_SEND_BUFFER_PRE_PADDING,
+                                          conn->buf_in + LWS_SEND_BUFFER_PRE_PADDING,
+                                          len_so_far);
+                               free(conn->buf_in);
+                               conn->buf_in = new_buf;
+                               conn->zs_in.next_out = (new_buf + LWS_SEND_BUFFER_PRE_PADDING + len_so_far);
+                               conn->zs_in.avail_out = (conn->buf_in_length - len_so_far);
+                       }
+                       else
+                       {
+                               break;
+                       }
+               }
+
+               /* rewrite the buffer pointers and length */
+               eff_buf->token = (char *)(conn->buf_in + LWS_SEND_BUFFER_PRE_PADDING);
+               eff_buf->token_len = (int)(conn->zs_in.next_out - (conn->buf_in + LWS_SEND_BUFFER_PRE_PADDING));
+
+               return 0;
+
+       case LWS_EXT_CALLBACK_PAYLOAD_TX:
+               /*
+                * deflate the outgoing payload
+                */
+               conn->zs_out.next_in = (unsigned char *)eff_buf->token;
+               conn->zs_out.avail_in = eff_buf->token_len;
+
+               conn->zs_out.next_out = conn->buf_out + LWS_SEND_BUFFER_PRE_PADDING;
+               conn->zs_out.avail_out = conn->buf_out_length;
+
+               while (1)
+               {
+                       n = deflate(&conn->zs_out, Z_SYNC_FLUSH);
+                       if (n == Z_STREAM_ERROR) {
+                               /*
+                                * screwed.. close the connection... we will get a
+                                * destroy callback to take care of closing nicely
+                                */
+                               lws_log(LWS_LOG_ERROR, "zlib error deflate");
+
+                               return -1;
+                       }
+
+                       if (conn->zs_out.avail_in > 0)
+                       {
+                               size_t len_so_far = (conn->zs_out.next_out - (conn->buf_out + LWS_SEND_BUFFER_PRE_PADDING));
+                               unsigned char *new_buf;
+                               conn->buf_out_length *= 2;
+                               new_buf = (unsigned char *)malloc(LWS_SEND_BUFFER_PRE_PADDING +
+                                                                                                 conn->buf_out_length +
+                                                                                                 LWS_SEND_BUFFER_POST_PADDING);
+                               memcpy(new_buf + LWS_SEND_BUFFER_PRE_PADDING,
+                                          conn->buf_out + LWS_SEND_BUFFER_PRE_PADDING,
+                                          len_so_far);
+                               free(conn->buf_out);
+                               conn->buf_out = new_buf;
+                               conn->zs_out.next_out = (new_buf + LWS_SEND_BUFFER_PRE_PADDING + len_so_far);
+                               conn->zs_out.avail_out = (conn->buf_out_length - len_so_far);
+                       }
+                       else
+                       {
+                               break;
+                       }
+               }
+
+               conn->compressed_out = 1;
+
+               /* rewrite the buffer pointers and length */
+               eff_buf->token = (char *)(conn->buf_out + LWS_SEND_BUFFER_PRE_PADDING);
+               eff_buf->token_len = (int)(conn->zs_out.next_out - (conn->buf_out + LWS_SEND_BUFFER_PRE_PADDING)) - 4;
+
+               return 0;
+
+       case LWS_EXT_CALLBACK_PACKET_TX_PRESEND:
+               if (conn->compressed_out)
+               {
+                       conn->compressed_out = 0;
+                       *((unsigned char *)eff_buf->token) |= 0x40;
+               }
+               break;
+
+       case LWS_EXT_CALLBACK_CHECK_OK_TO_PROPOSE_EXTENSION:
+               /* Avoid x-webkit-deflate-frame extension on client */
+               if (strcmp((char *)in, "x-webkit-deflate-frame") == 0)
+               {
+                       return 1;
+               }
+               break;
+
+       default:
+               break;
+       }
+
+       return 0;
+}
diff --git a/lib/extension-deflate-frame.h b/lib/extension-deflate-frame.h
new file mode 100644 (file)
index 0000000..88b27c1
--- /dev/null
@@ -0,0 +1,21 @@
+
+#include <zlib.h>
+
+#define DEFLATE_FRAME_COMPRESSION_LEVEL 1
+
+struct lws_ext_deflate_frame_conn {
+       z_stream zs_in;
+       z_stream zs_out;
+       int buf_in_length;
+       int buf_out_length;
+       int compressed_out;
+       unsigned char *buf_in;
+       unsigned char *buf_out;
+};
+
+extern int lws_extension_callback_deflate_frame(
+               struct libwebsocket_context *context,
+               struct libwebsocket_extension *ext,
+               struct libwebsocket *wsi,
+               enum libwebsocket_extension_callback_reasons reason,
+               void *user, void *in, size_t len);
index 8909308..c302f41 100644 (file)
@@ -1,5 +1,6 @@
 #include "private-libwebsockets.h"
 
+#include "extension-deflate-frame.h"
 #include "extension-deflate-stream.h"
 #include "extension-x-google-mux.h"
 
@@ -11,11 +12,24 @@ struct libwebsocket_extension libwebsocket_internal_extensions[] = {
                sizeof (struct lws_ext_x_google_mux_conn)
        },
 #endif
+#ifdef LWS_EXT_DEFLATE_STREAM
        {
                "deflate-stream",
                lws_extension_callback_deflate_stream,
                sizeof (struct lws_ext_deflate_stream_conn)
        },
+#else
+       {
+               "x-webkit-deflate-frame",
+               lws_extension_callback_deflate_frame,
+               sizeof (struct lws_ext_deflate_frame_conn)
+       },
+       {
+               "deflate-frame",
+               lws_extension_callback_deflate_frame,
+               sizeof (struct lws_ext_deflate_frame_conn)
+       },
+#endif
        { /* terminator */
                NULL, NULL, 0
        }
index 8c371f3..e199c14 100644 (file)
-<?xml version="1.0" encoding="utf-8"?>\r
-<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">\r
-  <ItemGroup Label="ProjectConfigurations">\r
-    <ProjectConfiguration Include="Debug static|Win32">\r
-      <Configuration>Debug static</Configuration>\r
-      <Platform>Win32</Platform>\r
-    </ProjectConfiguration>\r
-    <ProjectConfiguration Include="Debug|Win32">\r
-      <Configuration>Debug</Configuration>\r
-      <Platform>Win32</Platform>\r
-    </ProjectConfiguration>\r
-    <ProjectConfiguration Include="Debug|x64">\r
-      <Configuration>Debug</Configuration>\r
-      <Platform>x64</Platform>\r
-    </ProjectConfiguration>\r
-    <ProjectConfiguration Include="Release DLL|Win32">\r
-      <Configuration>Release DLL</Configuration>\r
-      <Platform>Win32</Platform>\r
-    </ProjectConfiguration>\r
-    <ProjectConfiguration Include="Release DLL|x64">\r
-      <Configuration>Release DLL</Configuration>\r
-      <Platform>x64</Platform>\r
-    </ProjectConfiguration>\r
-    <ProjectConfiguration Include="Release static|Win32">\r
-      <Configuration>Release static</Configuration>\r
-      <Platform>Win32</Platform>\r
-    </ProjectConfiguration>\r
-    <ProjectConfiguration Include="Release|Win32">\r
-      <Configuration>Release</Configuration>\r
-      <Platform>Win32</Platform>\r
-    </ProjectConfiguration>\r
-    <ProjectConfiguration Include="Release|x64">\r
-      <Configuration>Release</Configuration>\r
-      <Platform>x64</Platform>\r
-    </ProjectConfiguration>\r
-  </ItemGroup>\r
-  <PropertyGroup Label="Globals">\r
-    <ProjectGuid>{332BF17E-FD30-4363-975A-AA731A827B4F}</ProjectGuid>\r
-    <Keyword>Win32Proj</Keyword>\r
-    <RootNamespace>libwebsocketswin32</RootNamespace>\r
-  </PropertyGroup>\r
-  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />\r
-  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">\r
-    <ConfigurationType>StaticLibrary</ConfigurationType>\r
-    <UseDebugLibraries>true</UseDebugLibraries>\r
-    <CharacterSet>Unicode</CharacterSet>\r
-  </PropertyGroup>\r
-  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug static|Win32'" Label="Configuration">\r
-    <ConfigurationType>StaticLibrary</ConfigurationType>\r
-    <UseDebugLibraries>true</UseDebugLibraries>\r
-    <CharacterSet>Unicode</CharacterSet>\r
-  </PropertyGroup>\r
-  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">\r
-    <ConfigurationType>StaticLibrary</ConfigurationType>\r
-    <UseDebugLibraries>true</UseDebugLibraries>\r
-    <CharacterSet>Unicode</CharacterSet>\r
-  </PropertyGroup>\r
-  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug static|x64'" Label="Configuration">\r
-    <ConfigurationType>StaticLibrary</ConfigurationType>\r
-    <UseDebugLibraries>true</UseDebugLibraries>\r
-    <CharacterSet>Unicode</CharacterSet>\r
-  </PropertyGroup>\r
-  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">\r
-    <ConfigurationType>StaticLibrary</ConfigurationType>\r
-    <UseDebugLibraries>false</UseDebugLibraries>\r
-    <WholeProgramOptimization>true</WholeProgramOptimization>\r
-    <CharacterSet>Unicode</CharacterSet>\r
-  </PropertyGroup>\r
-  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">\r
-    <ConfigurationType>StaticLibrary</ConfigurationType>\r
-    <UseDebugLibraries>false</UseDebugLibraries>\r
-    <WholeProgramOptimization>true</WholeProgramOptimization>\r
-    <CharacterSet>Unicode</CharacterSet>\r
-  </PropertyGroup>\r
-  <PropertyGroup Label="Configuration" Condition="'$(Configuration)|$(Platform)'=='Release static|Win32'">\r
-    <ConfigurationType>StaticLibrary</ConfigurationType>\r
-  </PropertyGroup>\r
-  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release DLL|Win32'" Label="Configuration">\r
-    <ConfigurationType>DynamicLibrary</ConfigurationType>\r
-    <WholeProgramOptimization>true</WholeProgramOptimization>\r
-  </PropertyGroup>\r
-  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />\r
-  <ImportGroup Label="ExtensionSettings">\r
-  </ImportGroup>\r
-  <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">\r
-    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />\r
-  </ImportGroup>\r
-  <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug static|Win32'" Label="PropertySheets">\r
-    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />\r
-  </ImportGroup>\r
-  <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets">\r
-    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />\r
-  </ImportGroup>\r
-  <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug static|x64'" Label="PropertySheets">\r
-    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />\r
-  </ImportGroup>\r
-  <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">\r
-    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />\r
-  </ImportGroup>\r
-  <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">\r
-    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />\r
-  </ImportGroup>\r
-  <PropertyGroup Label="UserMacros" />\r
-  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug static|Win32'">\r
-    <OutDir>$(SolutionDir)..\output\</OutDir>\r
-    <LibraryPath>D:\Libraries\libwebsockets\output\;$(LibraryPath)</LibraryPath>\r
-    <TargetName>libwebsockets_vc100-mt-sgd</TargetName>\r
-  </PropertyGroup>\r
-  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">\r
-    <LibraryPath>D:\Libraries\libwebsockets\output\;$(LibraryPath)</LibraryPath>\r
-  </PropertyGroup>\r
-  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">\r
-    <LibraryPath>D:\Libraries\libwebsockets\output\;$(LibraryPath)</LibraryPath>\r
-  </PropertyGroup>\r
-  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release static|Win32'">\r
-    <TargetName>libwebsockets_vc100-mt-s</TargetName>\r
-  </PropertyGroup>\r
-  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">\r
-    <ClCompile>\r
-      <PrecompiledHeader>\r
-      </PrecompiledHeader>\r
-      <WarningLevel>Level3</WarningLevel>\r
-      <Optimization>Disabled</Optimization>\r
-      <PreprocessorDefinitions>WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>\r
-      <AdditionalIncludeDirectories>../win32helpers;../zlib</AdditionalIncludeDirectories>\r
-      <ExceptionHandling>false</ExceptionHandling>\r
-    </ClCompile>\r
-    <Link>\r
-      <SubSystem>Windows</SubSystem>\r
-      <GenerateDebugInformation>true</GenerateDebugInformation>\r
-    </Link>\r
-  </ItemDefinitionGroup>\r
-  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug static|Win32'">\r
-    <ClCompile>\r
-      <PrecompiledHeader>\r
-      </PrecompiledHeader>\r
-      <WarningLevel>Level3</WarningLevel>\r
-      <Optimization>Disabled</Optimization>\r
-      <PreprocessorDefinitions>WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>\r
-      <AdditionalIncludeDirectories>../win32helpers;../zlib</AdditionalIncludeDirectories>\r
-      <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>\r
-      <ExceptionHandling>false</ExceptionHandling>\r
-    </ClCompile>\r
-    <Link>\r
-      <SubSystem>Windows</SubSystem>\r
-      <GenerateDebugInformation>true</GenerateDebugInformation>\r
-    </Link>\r
-    <Lib>\r
-      <OutputFile>$(OutDir)libwebsockets_vc100-mt-sgd$(TargetExt)</OutputFile>\r
-    </Lib>\r
-  </ItemDefinitionGroup>\r
-  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">\r
-    <ClCompile>\r
-      <PrecompiledHeader>\r
-      </PrecompiledHeader>\r
-      <WarningLevel>Level3</WarningLevel>\r
-      <Optimization>Disabled</Optimization>\r
-      <PreprocessorDefinitions>WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>\r
-      <AdditionalIncludeDirectories>../win32helpers;../zlib</AdditionalIncludeDirectories>\r
-    </ClCompile>\r
-    <Link>\r
-      <SubSystem>Windows</SubSystem>\r
-      <GenerateDebugInformation>true</GenerateDebugInformation>\r
-    </Link>\r
-  </ItemDefinitionGroup>\r
-  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug static|x64'">\r
-    <ClCompile>\r
-      <PrecompiledHeader>\r
-      </PrecompiledHeader>\r
-      <WarningLevel>Level3</WarningLevel>\r
-      <Optimization>Disabled</Optimization>\r
-      <PreprocessorDefinitions>WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>\r
-      <AdditionalIncludeDirectories>../win32helpers;../zlib</AdditionalIncludeDirectories>\r
-    </ClCompile>\r
-    <Link>\r
-      <SubSystem>Windows</SubSystem>\r
-      <GenerateDebugInformation>true</GenerateDebugInformation>\r
-    </Link>\r
-  </ItemDefinitionGroup>\r
-  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">\r
-    <ClCompile>\r
-      <WarningLevel>Level3</WarningLevel>\r
-      <PrecompiledHeader>\r
-      </PrecompiledHeader>\r
-      <Optimization>MaxSpeed</Optimization>\r
-      <FunctionLevelLinking>true</FunctionLevelLinking>\r
-      <IntrinsicFunctions>true</IntrinsicFunctions>\r
-      <PreprocessorDefinitions>WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>\r
-      <AdditionalIncludeDirectories>../win32helpers;../zlib</AdditionalIncludeDirectories>\r
-      <RuntimeLibrary>MultiThreaded</RuntimeLibrary>\r
-      <ExceptionHandling>false</ExceptionHandling>\r
-    </ClCompile>\r
-    <Link>\r
-      <SubSystem>Windows</SubSystem>\r
-      <GenerateDebugInformation>true</GenerateDebugInformation>\r
-      <EnableCOMDATFolding>true</EnableCOMDATFolding>\r
-      <OptimizeReferences>true</OptimizeReferences>\r
-    </Link>\r
-  </ItemDefinitionGroup>\r
-  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">\r
-    <ClCompile>\r
-      <WarningLevel>Level3</WarningLevel>\r
-      <PrecompiledHeader>\r
-      </PrecompiledHeader>\r
-      <Optimization>MaxSpeed</Optimization>\r
-      <FunctionLevelLinking>true</FunctionLevelLinking>\r
-      <IntrinsicFunctions>true</IntrinsicFunctions>\r
-      <PreprocessorDefinitions>WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>\r
-      <AdditionalIncludeDirectories>../win32helpers;../zlib</AdditionalIncludeDirectories>\r
-    </ClCompile>\r
-    <Link>\r
-      <SubSystem>Windows</SubSystem>\r
-      <GenerateDebugInformation>true</GenerateDebugInformation>\r
-      <EnableCOMDATFolding>true</EnableCOMDATFolding>\r
-      <OptimizeReferences>true</OptimizeReferences>\r
-    </Link>\r
-  </ItemDefinitionGroup>\r
-  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release static|Win32'">\r
-    <ClCompile>\r
-      <AdditionalIncludeDirectories>../win32helpers;../zlib</AdditionalIncludeDirectories>\r
-      <PreprocessorDefinitions>WIN32</PreprocessorDefinitions>\r
-      <ExceptionHandling>false</ExceptionHandling>\r
-      <RuntimeLibrary>MultiThreaded</RuntimeLibrary>\r
-    </ClCompile>\r
-    <Lib>\r
-      <OutputFile>$(OutDir)libwebsockets_vc100-mt-s.lib</OutputFile>\r
-    </Lib>\r
-  </ItemDefinitionGroup>\r
-  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release DLL|Win32'">\r
-    <ClCompile>\r
-      <AdditionalIncludeDirectories>../win32helpers;../zlib</AdditionalIncludeDirectories>\r
-      <PreprocessorDefinitions>WIN32;LWS_INTERNAL;LWS_DLL</PreprocessorDefinitions>\r
-      <ExceptionHandling>false</ExceptionHandling>\r
-      <RuntimeLibrary>MultiThreaded</RuntimeLibrary>\r
-      <BufferSecurityCheck>false</BufferSecurityCheck>\r
-      <FavorSizeOrSpeed>Speed</FavorSizeOrSpeed>\r
-      <FunctionLevelLinking>true</FunctionLevelLinking>\r
-    </ClCompile>\r
-    <Lib>\r
-      <OutputFile>$(OutDir)libwebsockets_vc100-mt-s.lib</OutputFile>\r
-    </Lib>\r
-    <Link>\r
-      <AdditionalDependencies>Ws2_32.lib;..\..\output\ZLib_vc100-mt-s.lib;%(AdditionalDependencies)</AdditionalDependencies>\r
-      <OptimizeReferences>true</OptimizeReferences>\r
-      <EnableCOMDATFolding>true</EnableCOMDATFolding>\r
-      <GenerateDebugInformation>true</GenerateDebugInformation>\r
-    </Link>\r
-    <ProjectReference />\r
-  </ItemDefinitionGroup>\r
-  <ItemGroup>\r
-    <ClCompile Include="..\..\lib\base64-decode.c" />\r
-    <ClCompile Include="..\..\lib\client-handshake.c" />\r
-    <ClCompile Include="..\..\lib\extension-deflate-stream.c" />\r
-    <ClCompile Include="..\..\lib\extension.c" />\r
-    <ClCompile Include="..\..\lib\handshake.c" />\r
-    <ClCompile Include="..\..\lib\libwebsockets.c" />\r
-    <ClCompile Include="..\..\lib\md5.c" />\r
-    <ClCompile Include="..\..\lib\parsers.c" />\r
-    <ClCompile Include="..\..\lib\sha-1.c" />\r
-    <ClCompile Include="..\win32helpers\gettimeofday.c" />\r
-    <ClCompile Include="..\win32helpers\websock-w32.c" />\r
-  </ItemGroup>\r
-  <ItemGroup>\r
-    <ClInclude Include="..\..\lib\extension-deflate-stream.h" />\r
-    <ClInclude Include="..\..\lib\extension-x-google-mux.h" />\r
-    <ClInclude Include="..\..\lib\libwebsockets.h" />\r
-    <ClInclude Include="..\..\lib\private-libwebsockets.h" />\r
-    <ClInclude Include="..\win32helpers\gettimeofday.h" />\r
-    <ClInclude Include="..\win32helpers\websock-w32.h" />\r
-  </ItemGroup>\r
-  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />\r
-  <ImportGroup Label="ExtensionTargets">\r
-  </ImportGroup>\r
-</Project>
\ No newline at end of file
+<?xml version="1.0" encoding="utf-8"?>
+<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+  <ItemGroup Label="ProjectConfigurations">
+    <ProjectConfiguration Include="Debug static|Win32">
+      <Configuration>Debug static</Configuration>
+      <Platform>Win32</Platform>
+    </ProjectConfiguration>
+    <ProjectConfiguration Include="Debug|Win32">
+      <Configuration>Debug</Configuration>
+      <Platform>Win32</Platform>
+    </ProjectConfiguration>
+    <ProjectConfiguration Include="Debug|x64">
+      <Configuration>Debug</Configuration>
+      <Platform>x64</Platform>
+    </ProjectConfiguration>
+    <ProjectConfiguration Include="Release DLL|Win32">
+      <Configuration>Release DLL</Configuration>
+      <Platform>Win32</Platform>
+    </ProjectConfiguration>
+    <ProjectConfiguration Include="Release DLL|x64">
+      <Configuration>Release DLL</Configuration>
+      <Platform>x64</Platform>
+    </ProjectConfiguration>
+    <ProjectConfiguration Include="Release static|Win32">
+      <Configuration>Release static</Configuration>
+      <Platform>Win32</Platform>
+    </ProjectConfiguration>
+    <ProjectConfiguration Include="Release|Win32">
+      <Configuration>Release</Configuration>
+      <Platform>Win32</Platform>
+    </ProjectConfiguration>
+    <ProjectConfiguration Include="Release|x64">
+      <Configuration>Release</Configuration>
+      <Platform>x64</Platform>
+    </ProjectConfiguration>
+  </ItemGroup>
+  <PropertyGroup Label="Globals">
+    <ProjectGuid>{332BF17E-FD30-4363-975A-AA731A827B4F}</ProjectGuid>
+    <Keyword>Win32Proj</Keyword>
+    <RootNamespace>libwebsocketswin32</RootNamespace>
+  </PropertyGroup>
+  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
+    <ConfigurationType>StaticLibrary</ConfigurationType>
+    <UseDebugLibraries>true</UseDebugLibraries>
+    <CharacterSet>Unicode</CharacterSet>
+  </PropertyGroup>
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug static|Win32'" Label="Configuration">
+    <ConfigurationType>StaticLibrary</ConfigurationType>
+    <UseDebugLibraries>true</UseDebugLibraries>
+    <CharacterSet>Unicode</CharacterSet>
+  </PropertyGroup>
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
+    <ConfigurationType>StaticLibrary</ConfigurationType>
+    <UseDebugLibraries>true</UseDebugLibraries>
+    <CharacterSet>Unicode</CharacterSet>
+  </PropertyGroup>
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug static|x64'" Label="Configuration">
+    <ConfigurationType>StaticLibrary</ConfigurationType>
+    <UseDebugLibraries>true</UseDebugLibraries>
+    <CharacterSet>Unicode</CharacterSet>
+  </PropertyGroup>
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
+    <ConfigurationType>StaticLibrary</ConfigurationType>
+    <UseDebugLibraries>false</UseDebugLibraries>
+    <WholeProgramOptimization>true</WholeProgramOptimization>
+    <CharacterSet>Unicode</CharacterSet>
+  </PropertyGroup>
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
+    <ConfigurationType>StaticLibrary</ConfigurationType>
+    <UseDebugLibraries>false</UseDebugLibraries>
+    <WholeProgramOptimization>true</WholeProgramOptimization>
+    <CharacterSet>Unicode</CharacterSet>
+  </PropertyGroup>
+  <PropertyGroup Label="Configuration" Condition="'$(Configuration)|$(Platform)'=='Release static|Win32'">
+    <ConfigurationType>StaticLibrary</ConfigurationType>
+  </PropertyGroup>
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release DLL|Win32'" Label="Configuration">
+    <ConfigurationType>DynamicLibrary</ConfigurationType>
+    <WholeProgramOptimization>true</WholeProgramOptimization>
+  </PropertyGroup>
+  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
+  <ImportGroup Label="ExtensionSettings">
+  </ImportGroup>
+  <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
+    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+  </ImportGroup>
+  <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug static|Win32'" Label="PropertySheets">
+    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+  </ImportGroup>
+  <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets">
+    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+  </ImportGroup>
+  <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug static|x64'" Label="PropertySheets">
+    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+  </ImportGroup>
+  <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
+    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+  </ImportGroup>
+  <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">
+    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+  </ImportGroup>
+  <PropertyGroup Label="UserMacros" />
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug static|Win32'">
+    <OutDir>$(SolutionDir)..\output\</OutDir>
+    <LibraryPath>D:\Libraries\libwebsockets\output\;$(LibraryPath)</LibraryPath>
+    <TargetName>libwebsockets_vc100-mt-sgd</TargetName>
+  </PropertyGroup>
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
+    <LibraryPath>D:\Libraries\libwebsockets\output\;$(LibraryPath)</LibraryPath>
+  </PropertyGroup>
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
+    <LibraryPath>D:\Libraries\libwebsockets\output\;$(LibraryPath)</LibraryPath>
+  </PropertyGroup>
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release static|Win32'">
+    <TargetName>libwebsockets_vc100-mt-s</TargetName>
+  </PropertyGroup>
+  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
+    <ClCompile>
+      <PrecompiledHeader>
+      </PrecompiledHeader>
+      <WarningLevel>Level3</WarningLevel>
+      <Optimization>Disabled</Optimization>
+      <PreprocessorDefinitions>WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <AdditionalIncludeDirectories>../win32helpers;../zlib</AdditionalIncludeDirectories>
+      <ExceptionHandling>false</ExceptionHandling>
+    </ClCompile>
+    <Link>
+      <SubSystem>Windows</SubSystem>
+      <GenerateDebugInformation>true</GenerateDebugInformation>
+    </Link>
+  </ItemDefinitionGroup>
+  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug static|Win32'">
+    <ClCompile>
+      <PrecompiledHeader>
+      </PrecompiledHeader>
+      <WarningLevel>Level3</WarningLevel>
+      <Optimization>Disabled</Optimization>
+      <PreprocessorDefinitions>WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <AdditionalIncludeDirectories>../win32helpers;../zlib</AdditionalIncludeDirectories>
+      <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
+      <ExceptionHandling>false</ExceptionHandling>
+    </ClCompile>
+    <Link>
+      <SubSystem>Windows</SubSystem>
+      <GenerateDebugInformation>true</GenerateDebugInformation>
+    </Link>
+    <Lib>
+      <OutputFile>$(OutDir)libwebsockets_vc100-mt-sgd$(TargetExt)</OutputFile>
+    </Lib>
+  </ItemDefinitionGroup>
+  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
+    <ClCompile>
+      <PrecompiledHeader>
+      </PrecompiledHeader>
+      <WarningLevel>Level3</WarningLevel>
+      <Optimization>Disabled</Optimization>
+      <PreprocessorDefinitions>WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <AdditionalIncludeDirectories>../win32helpers;../zlib</AdditionalIncludeDirectories>
+    </ClCompile>
+    <Link>
+      <SubSystem>Windows</SubSystem>
+      <GenerateDebugInformation>true</GenerateDebugInformation>
+    </Link>
+  </ItemDefinitionGroup>
+  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug static|x64'">
+    <ClCompile>
+      <PrecompiledHeader>
+      </PrecompiledHeader>
+      <WarningLevel>Level3</WarningLevel>
+      <Optimization>Disabled</Optimization>
+      <PreprocessorDefinitions>WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <AdditionalIncludeDirectories>../win32helpers;../zlib</AdditionalIncludeDirectories>
+    </ClCompile>
+    <Link>
+      <SubSystem>Windows</SubSystem>
+      <GenerateDebugInformation>true</GenerateDebugInformation>
+    </Link>
+  </ItemDefinitionGroup>
+  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
+    <ClCompile>
+      <WarningLevel>Level3</WarningLevel>
+      <PrecompiledHeader>
+      </PrecompiledHeader>
+      <Optimization>MaxSpeed</Optimization>
+      <FunctionLevelLinking>true</FunctionLevelLinking>
+      <IntrinsicFunctions>true</IntrinsicFunctions>
+      <PreprocessorDefinitions>WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <AdditionalIncludeDirectories>../win32helpers;../zlib</AdditionalIncludeDirectories>
+      <RuntimeLibrary>MultiThreaded</RuntimeLibrary>
+      <ExceptionHandling>false</ExceptionHandling>
+    </ClCompile>
+    <Link>
+      <SubSystem>Windows</SubSystem>
+      <GenerateDebugInformation>true</GenerateDebugInformation>
+      <EnableCOMDATFolding>true</EnableCOMDATFolding>
+      <OptimizeReferences>true</OptimizeReferences>
+    </Link>
+  </ItemDefinitionGroup>
+  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
+    <ClCompile>
+      <WarningLevel>Level3</WarningLevel>
+      <PrecompiledHeader>
+      </PrecompiledHeader>
+      <Optimization>MaxSpeed</Optimization>
+      <FunctionLevelLinking>true</FunctionLevelLinking>
+      <IntrinsicFunctions>true</IntrinsicFunctions>
+      <PreprocessorDefinitions>WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <AdditionalIncludeDirectories>../win32helpers;../zlib</AdditionalIncludeDirectories>
+    </ClCompile>
+    <Link>
+      <SubSystem>Windows</SubSystem>
+      <GenerateDebugInformation>true</GenerateDebugInformation>
+      <EnableCOMDATFolding>true</EnableCOMDATFolding>
+      <OptimizeReferences>true</OptimizeReferences>
+    </Link>
+  </ItemDefinitionGroup>
+  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release static|Win32'">
+    <ClCompile>
+      <AdditionalIncludeDirectories>../win32helpers;../zlib</AdditionalIncludeDirectories>
+      <PreprocessorDefinitions>WIN32</PreprocessorDefinitions>
+      <ExceptionHandling>false</ExceptionHandling>
+      <RuntimeLibrary>MultiThreaded</RuntimeLibrary>
+    </ClCompile>
+    <Lib>
+      <OutputFile>$(OutDir)libwebsockets_vc100-mt-s.lib</OutputFile>
+    </Lib>
+  </ItemDefinitionGroup>
+  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release DLL|Win32'">
+    <ClCompile>
+      <AdditionalIncludeDirectories>../win32helpers;../zlib</AdditionalIncludeDirectories>
+      <PreprocessorDefinitions>WIN32;LWS_INTERNAL;LWS_DLL</PreprocessorDefinitions>
+      <ExceptionHandling>false</ExceptionHandling>
+      <RuntimeLibrary>MultiThreaded</RuntimeLibrary>
+      <BufferSecurityCheck>false</BufferSecurityCheck>
+      <FavorSizeOrSpeed>Speed</FavorSizeOrSpeed>
+      <FunctionLevelLinking>true</FunctionLevelLinking>
+      <EnableEnhancedInstructionSet>StreamingSIMDExtensions2</EnableEnhancedInstructionSet>
+      <FloatingPointModel>Fast</FloatingPointModel>
+      <StringPooling>true</StringPooling>
+    </ClCompile>
+    <Lib>
+      <OutputFile>$(OutDir)libwebsockets_vc100-mt-s.lib</OutputFile>
+    </Lib>
+    <Link>
+      <AdditionalDependencies>Ws2_32.lib;..\..\output\ZLib_vc100-mt-s.lib;%(AdditionalDependencies)</AdditionalDependencies>
+      <OptimizeReferences>true</OptimizeReferences>
+      <EnableCOMDATFolding>true</EnableCOMDATFolding>
+      <GenerateDebugInformation>true</GenerateDebugInformation>
+    </Link>
+    <ProjectReference />
+  </ItemDefinitionGroup>
+  <ItemGroup>
+    <ClCompile Include="..\..\lib\base64-decode.c" />
+    <ClCompile Include="..\..\lib\client-handshake.c" />
+    <ClCompile Include="..\..\lib\extension-deflate-frame.c" />
+    <ClCompile Include="..\..\lib\extension-deflate-stream.c" />
+    <ClCompile Include="..\..\lib\extension.c" />
+    <ClCompile Include="..\..\lib\handshake.c" />
+    <ClCompile Include="..\..\lib\libwebsockets.c" />
+    <ClCompile Include="..\..\lib\md5.c" />
+    <ClCompile Include="..\..\lib\parsers.c" />
+    <ClCompile Include="..\..\lib\sha-1.c" />
+    <ClCompile Include="..\win32helpers\gettimeofday.c" />
+    <ClCompile Include="..\win32helpers\websock-w32.c" />
+  </ItemGroup>
+  <ItemGroup>
+    <ClInclude Include="..\..\lib\extension-deflate-frame.h" />
+    <ClInclude Include="..\..\lib\extension-deflate-stream.h" />
+    <ClInclude Include="..\..\lib\extension-x-google-mux.h" />
+    <ClInclude Include="..\..\lib\libwebsockets.h" />
+    <ClInclude Include="..\..\lib\private-libwebsockets.h" />
+    <ClInclude Include="..\win32helpers\gettimeofday.h" />
+    <ClInclude Include="..\win32helpers\websock-w32.h" />
+  </ItemGroup>
+  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
+  <ImportGroup Label="ExtensionTargets">
+  </ImportGroup>
+</Project>
index 3c6edbb..05ff11a 100644 (file)
@@ -1,72 +1,78 @@
-<?xml version="1.0" encoding="utf-8"?>\r
-<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">\r
-  <ItemGroup>\r
-    <Filter Include="Source Files">\r
-      <UniqueIdentifier>{4FC737F1-C7A5-4376-A066-2A32D752A2FF}</UniqueIdentifier>\r
-      <Extensions>cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions>\r
-    </Filter>\r
-    <Filter Include="Header Files">\r
-      <UniqueIdentifier>{93995380-89BD-4b04-88EB-625FBE52EBFB}</UniqueIdentifier>\r
-      <Extensions>h;hpp;hxx;hm;inl;inc;xsd</Extensions>\r
-    </Filter>\r
-    <Filter Include="Resource Files">\r
-      <UniqueIdentifier>{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}</UniqueIdentifier>\r
-      <Extensions>rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms</Extensions>\r
-    </Filter>\r
-  </ItemGroup>\r
-  <ItemGroup>\r
-    <ClCompile Include="..\..\lib\base64-decode.c">\r
-      <Filter>Source Files</Filter>\r
-    </ClCompile>\r
-    <ClCompile Include="..\..\lib\client-handshake.c">\r
-      <Filter>Source Files</Filter>\r
-    </ClCompile>\r
-    <ClCompile Include="..\..\lib\handshake.c">\r
-      <Filter>Source Files</Filter>\r
-    </ClCompile>\r
-    <ClCompile Include="..\..\lib\libwebsockets.c">\r
-      <Filter>Source Files</Filter>\r
-    </ClCompile>\r
-    <ClCompile Include="..\..\lib\md5.c">\r
-      <Filter>Source Files</Filter>\r
-    </ClCompile>\r
-    <ClCompile Include="..\..\lib\parsers.c">\r
-      <Filter>Source Files</Filter>\r
-    </ClCompile>\r
-    <ClCompile Include="..\..\lib\sha-1.c">\r
-      <Filter>Source Files</Filter>\r
-    </ClCompile>\r
-    <ClCompile Include="..\..\lib\extension.c">\r
-      <Filter>Source Files</Filter>\r
-    </ClCompile>\r
-    <ClCompile Include="..\..\lib\extension-deflate-stream.c">\r
-      <Filter>Source Files</Filter>\r
-    </ClCompile>\r
-    <ClCompile Include="..\win32helpers\gettimeofday.c">\r
-      <Filter>Source Files</Filter>\r
-    </ClCompile>\r
-    <ClCompile Include="..\win32helpers\websock-w32.c">\r
-      <Filter>Source Files</Filter>\r
-    </ClCompile>\r
-  </ItemGroup>\r
-  <ItemGroup>\r
-    <ClInclude Include="..\..\lib\libwebsockets.h">\r
-      <Filter>Header Files</Filter>\r
-    </ClInclude>\r
-    <ClInclude Include="..\..\lib\private-libwebsockets.h">\r
-      <Filter>Header Files</Filter>\r
-    </ClInclude>\r
-    <ClInclude Include="..\..\lib\extension-deflate-stream.h">\r
-      <Filter>Header Files</Filter>\r
-    </ClInclude>\r
-    <ClInclude Include="..\..\lib\extension-x-google-mux.h">\r
-      <Filter>Header Files</Filter>\r
-    </ClInclude>\r
-    <ClInclude Include="..\win32helpers\gettimeofday.h">\r
-      <Filter>Source Files</Filter>\r
-    </ClInclude>\r
-    <ClInclude Include="..\win32helpers\websock-w32.h">\r
-      <Filter>Header Files</Filter>\r
-    </ClInclude>\r
-  </ItemGroup>\r
-</Project>
\ No newline at end of file
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+  <ItemGroup>
+    <Filter Include="Source Files">
+      <UniqueIdentifier>{4FC737F1-C7A5-4376-A066-2A32D752A2FF}</UniqueIdentifier>
+      <Extensions>cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
+    </Filter>
+    <Filter Include="Header Files">
+      <UniqueIdentifier>{93995380-89BD-4b04-88EB-625FBE52EBFB}</UniqueIdentifier>
+      <Extensions>h;hpp;hxx;hm;inl;inc;xsd</Extensions>
+    </Filter>
+    <Filter Include="Resource Files">
+      <UniqueIdentifier>{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}</UniqueIdentifier>
+      <Extensions>rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms</Extensions>
+    </Filter>
+  </ItemGroup>
+  <ItemGroup>
+    <ClCompile Include="..\..\lib\base64-decode.c">
+      <Filter>Source Files</Filter>
+    </ClCompile>
+    <ClCompile Include="..\..\lib\client-handshake.c">
+      <Filter>Source Files</Filter>
+    </ClCompile>
+    <ClCompile Include="..\..\lib\handshake.c">
+      <Filter>Source Files</Filter>
+    </ClCompile>
+    <ClCompile Include="..\..\lib\libwebsockets.c">
+      <Filter>Source Files</Filter>
+    </ClCompile>
+    <ClCompile Include="..\..\lib\md5.c">
+      <Filter>Source Files</Filter>
+    </ClCompile>
+    <ClCompile Include="..\..\lib\parsers.c">
+      <Filter>Source Files</Filter>
+    </ClCompile>
+    <ClCompile Include="..\..\lib\sha-1.c">
+      <Filter>Source Files</Filter>
+    </ClCompile>
+    <ClCompile Include="..\..\lib\extension.c">
+      <Filter>Source Files</Filter>
+    </ClCompile>
+    <ClCompile Include="..\..\lib\extension-deflate-stream.c">
+      <Filter>Source Files</Filter>
+    </ClCompile>
+    <ClCompile Include="..\win32helpers\websock-w32.c">
+      <Filter>Source Files</Filter>
+    </ClCompile>
+    <ClCompile Include="..\win32helpers\gettimeofday.c">
+      <Filter>Source Files</Filter>
+    </ClCompile>
+    <ClCompile Include="..\..\lib\extension-deflate-frame.c">
+      <Filter>Source Files</Filter>
+    </ClCompile>
+  </ItemGroup>
+  <ItemGroup>
+    <ClInclude Include="..\..\lib\libwebsockets.h">
+      <Filter>Header Files</Filter>
+    </ClInclude>
+    <ClInclude Include="..\..\lib\private-libwebsockets.h">
+      <Filter>Header Files</Filter>
+    </ClInclude>
+    <ClInclude Include="..\..\lib\extension-deflate-stream.h">
+      <Filter>Header Files</Filter>
+    </ClInclude>
+    <ClInclude Include="..\..\lib\extension-x-google-mux.h">
+      <Filter>Header Files</Filter>
+    </ClInclude>
+    <ClInclude Include="..\win32helpers\websock-w32.h">
+      <Filter>Header Files</Filter>
+    </ClInclude>
+    <ClInclude Include="..\win32helpers\gettimeofday.h">
+      <Filter>Header Files</Filter>
+    </ClInclude>
+    <ClInclude Include="..\..\lib\extension-deflate-frame.h">
+      <Filter>Header Files</Filter>
+    </ClInclude>
+  </ItemGroup>
+</Project>