react-native-tcp-windows 0.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +20 -0
- package/README.md +145 -0
- package/lib/commonjs/ReactNativeTcpWindows.js +9 -0
- package/lib/commonjs/ReactNativeTcpWindows.js.map +1 -0
- package/lib/commonjs/index.js +124 -0
- package/lib/commonjs/index.js.map +1 -0
- package/lib/commonjs/package.json +1 -0
- package/lib/module/ReactNativeTcpWindows.js +5 -0
- package/lib/module/ReactNativeTcpWindows.js.map +1 -0
- package/lib/module/index.js +104 -0
- package/lib/module/index.js.map +1 -0
- package/lib/module/package.json +1 -0
- package/lib/typescript/commonjs/package.json +1 -0
- package/lib/typescript/commonjs/src/ReactNativeTcpWindows.d.ts +13 -0
- package/lib/typescript/commonjs/src/ReactNativeTcpWindows.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/__tests__/index.test.d.ts +1 -0
- package/lib/typescript/commonjs/src/__tests__/index.test.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/index.d.ts +80 -0
- package/lib/typescript/commonjs/src/index.d.ts.map +1 -0
- package/lib/typescript/module/package.json +1 -0
- package/lib/typescript/module/src/ReactNativeTcpWindows.d.ts +13 -0
- package/lib/typescript/module/src/ReactNativeTcpWindows.d.ts.map +1 -0
- package/lib/typescript/module/src/__tests__/index.test.d.ts +1 -0
- package/lib/typescript/module/src/__tests__/index.test.d.ts.map +1 -0
- package/lib/typescript/module/src/index.d.ts +80 -0
- package/lib/typescript/module/src/index.d.ts.map +1 -0
- package/package.json +204 -0
- package/react-native.config.js +12 -0
- package/src/ReactNativeTcpWindows.ts +14 -0
- package/src/__tests__/index.test.tsx +1 -0
- package/src/index.tsx +124 -0
- package/windows/ExperimentalFeatures.props +33 -0
- package/windows/ReactNativeTcpWindows/ReactNativeTcpWindows.cpp +206 -0
- package/windows/ReactNativeTcpWindows/ReactNativeTcpWindows.def +3 -0
- package/windows/ReactNativeTcpWindows/ReactNativeTcpWindows.h +83 -0
- package/windows/ReactNativeTcpWindows/ReactNativeTcpWindows.rc +0 -0
- package/windows/ReactNativeTcpWindows/ReactNativeTcpWindows.vcxproj +146 -0
- package/windows/ReactNativeTcpWindows/ReactNativeTcpWindows.vcxproj.filters +44 -0
- package/windows/ReactNativeTcpWindows/ReactPackageProvider.cpp +20 -0
- package/windows/ReactNativeTcpWindows/ReactPackageProvider.h +24 -0
- package/windows/ReactNativeTcpWindows/ReactPackageProvider.idl +9 -0
- package/windows/ReactNativeTcpWindows/TcpSocket.cpp +565 -0
- package/windows/ReactNativeTcpWindows/TcpSocket.h +69 -0
- package/windows/ReactNativeTcpWindows/codegen/.clang-format +2 -0
- package/windows/ReactNativeTcpWindows/codegen/NativeReactNativeTcpWindowsSpec.g.h +71 -0
- package/windows/ReactNativeTcpWindows/packages.lock.json +60 -0
- package/windows/ReactNativeTcpWindows/pch.cpp +1 -0
- package/windows/ReactNativeTcpWindows/pch.h +30 -0
- package/windows/ReactNativeTcpWindows/resource.h +5 -0
- package/windows/ReactNativeTcpWindows/targetver.h +8 -0
- package/windows/ReactNativeTcpWindows.sln +43 -0
@@ -0,0 +1,146 @@
|
|
1
|
+
<?xml version="1.0" encoding="utf-8"?>
|
2
|
+
<!-- This project was created with react-native-windows 0.79.0 -->
|
3
|
+
<Project DefaultTargets="Build" ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
4
|
+
<Import Project="$(SolutionDir)\ExperimentalFeatures.props" Condition="Exists('$(SolutionDir)\ExperimentalFeatures.props')" />
|
5
|
+
<PropertyGroup Label="Globals">
|
6
|
+
<CppWinRTOptimized>true</CppWinRTOptimized>
|
7
|
+
<MinimalCoreWin>true</MinimalCoreWin>
|
8
|
+
<ProjectGuid>{3F7AF48C-4049-4FA2-BC0D-466B2569EBDF}</ProjectGuid>
|
9
|
+
<ProjectName>ReactNativeTcpWindows</ProjectName>
|
10
|
+
<Keyword>Win32Proj</Keyword>
|
11
|
+
<RootNamespace>ReactNativeTcpWindows</RootNamespace>
|
12
|
+
<WindowsTargetPlatformVersion>10.0</WindowsTargetPlatformVersion>
|
13
|
+
<DefaultLanguage>en-US</DefaultLanguage>
|
14
|
+
<MinimumVisualStudioVersion>17.0</MinimumVisualStudioVersion>
|
15
|
+
<AppxPackage>false</AppxPackage>
|
16
|
+
</PropertyGroup>
|
17
|
+
<PropertyGroup Label="ReactNativeWindowsProps">
|
18
|
+
<ReactNativeWindowsDir Condition="'$(ReactNativeWindowsDir)' == ''">$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), 'node_modules\react-native-windows\package.json'))\node_modules\react-native-windows\</ReactNativeWindowsDir>
|
19
|
+
<RunAutolinkCheck>false</RunAutolinkCheck>
|
20
|
+
</PropertyGroup>
|
21
|
+
<Import Project="$(ReactNativeWindowsDir)\PropertySheets\External\Microsoft.ReactNative.WindowsSdk.Default.props" />
|
22
|
+
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
|
23
|
+
<ItemGroup Label="ProjectConfigurations">
|
24
|
+
<ProjectConfiguration Include="Debug|Win32">
|
25
|
+
<Configuration>Debug</Configuration>
|
26
|
+
<Platform>Win32</Platform>
|
27
|
+
</ProjectConfiguration>
|
28
|
+
<ProjectConfiguration Include="Release|Win32">
|
29
|
+
<Configuration>Release</Configuration>
|
30
|
+
<Platform>Win32</Platform>
|
31
|
+
</ProjectConfiguration>
|
32
|
+
<ProjectConfiguration Include="Debug|x64">
|
33
|
+
<Configuration>Debug</Configuration>
|
34
|
+
<Platform>x64</Platform>
|
35
|
+
</ProjectConfiguration>
|
36
|
+
<ProjectConfiguration Include="Release|x64">
|
37
|
+
<Configuration>Release</Configuration>
|
38
|
+
<Platform>x64</Platform>
|
39
|
+
</ProjectConfiguration>
|
40
|
+
<ProjectConfiguration Include="Debug|ARM64">
|
41
|
+
<Configuration>Debug</Configuration>
|
42
|
+
<Platform>ARM64</Platform>
|
43
|
+
</ProjectConfiguration>
|
44
|
+
<ProjectConfiguration Include="Release|ARM64">
|
45
|
+
<Configuration>Release</Configuration>
|
46
|
+
<Platform>ARM64</Platform>
|
47
|
+
</ProjectConfiguration>
|
48
|
+
</ItemGroup>
|
49
|
+
<PropertyGroup Label="Configuration">
|
50
|
+
<ConfigurationType>DynamicLibrary</ConfigurationType>
|
51
|
+
<CharacterSet>Unicode</CharacterSet>
|
52
|
+
<PlatformToolset>v143</PlatformToolset>
|
53
|
+
<GenerateManifest>false</GenerateManifest>
|
54
|
+
</PropertyGroup>
|
55
|
+
<PropertyGroup Condition="'$(Configuration)'=='Debug'" Label="Configuration">
|
56
|
+
<UseDebugLibraries>true</UseDebugLibraries>
|
57
|
+
</PropertyGroup>
|
58
|
+
<PropertyGroup Condition="'$(Configuration)'=='Release'" Label="Configuration">
|
59
|
+
<UseDebugLibraries>false</UseDebugLibraries>
|
60
|
+
<WholeProgramOptimization>true</WholeProgramOptimization>
|
61
|
+
</PropertyGroup>
|
62
|
+
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
|
63
|
+
<ImportGroup Label="ExtensionSettings">
|
64
|
+
</ImportGroup>
|
65
|
+
<ImportGroup Label="PropertySheets">
|
66
|
+
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
67
|
+
</ImportGroup>
|
68
|
+
<ImportGroup Label="ReactNativeWindowsPropertySheets">
|
69
|
+
<Import Project="$(ReactNativeWindowsDir)\PropertySheets\External\Microsoft.ReactNative.CppLib.props" Condition="Exists('$(ReactNativeWindowsDir)\PropertySheets\External\Microsoft.ReactNative.CppLib.props')" />
|
70
|
+
</ImportGroup>
|
71
|
+
<ItemDefinitionGroup>
|
72
|
+
<ClCompile>
|
73
|
+
<PrecompiledHeader>Use</PrecompiledHeader>
|
74
|
+
<PrecompiledHeaderFile>pch.h</PrecompiledHeaderFile>
|
75
|
+
<PrecompiledHeaderOutputFile>$(IntDir)pch.pch</PrecompiledHeaderOutputFile>
|
76
|
+
<WarningLevel>Level4</WarningLevel>
|
77
|
+
<SDLCheck>true</SDLCheck>
|
78
|
+
<AdditionalOptions>%(AdditionalOptions) /bigobj</AdditionalOptions>
|
79
|
+
<DisableSpecificWarnings>4453;28204</DisableSpecificWarnings>
|
80
|
+
<PreprocessorDefinitions>_WINRT_DLL;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
81
|
+
<AdditionalUsingDirectories>$(WindowsSDK_WindowsMetadata);$(AdditionalUsingDirectories)</AdditionalUsingDirectories>
|
82
|
+
<LanguageStandard>stdcpp20</LanguageStandard>
|
83
|
+
</ClCompile>
|
84
|
+
<Link>
|
85
|
+
<AdditionalDependencies>shell32.lib;user32.lib;windowsapp.lib;%(AdditionalDependenices)</AdditionalDependencies>
|
86
|
+
<SubSystem>Console</SubSystem>
|
87
|
+
<GenerateWindowsMetadata>true</GenerateWindowsMetadata>
|
88
|
+
<ModuleDefinitionFile>ReactNativeTcpWindows.def</ModuleDefinitionFile>
|
89
|
+
</Link>
|
90
|
+
</ItemDefinitionGroup>
|
91
|
+
<ItemDefinitionGroup Condition="'$(Configuration)'=='Debug'">
|
92
|
+
<ClCompile>
|
93
|
+
<PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
94
|
+
</ClCompile>
|
95
|
+
</ItemDefinitionGroup>
|
96
|
+
<ItemDefinitionGroup Condition="'$(Configuration)'=='Release'">
|
97
|
+
<ClCompile>
|
98
|
+
<PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
99
|
+
</ClCompile>
|
100
|
+
</ItemDefinitionGroup>
|
101
|
+
<PropertyGroup Label="UserMacros" />
|
102
|
+
<ItemGroup>
|
103
|
+
<ClInclude Include="ReactNativeTcpWindows.h" />
|
104
|
+
<ClInclude Include="TcpSocket.h">
|
105
|
+
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">false</ExcludedFromBuild>
|
106
|
+
</ClInclude>
|
107
|
+
<ClInclude Include="ReactPackageProvider.h">
|
108
|
+
<DependentUpon>ReactPackageProvider.idl</DependentUpon>
|
109
|
+
</ClInclude>
|
110
|
+
<ClInclude Include="resource.h" />
|
111
|
+
<ClInclude Include="pch.h" />
|
112
|
+
<ClInclude Include="targetver.h" />
|
113
|
+
</ItemGroup>
|
114
|
+
<ItemGroup>
|
115
|
+
<ClCompile Include="ReactNativeTcpWindows.cpp" />
|
116
|
+
<ClCompile Include="TcpSocket.cpp">
|
117
|
+
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">false</ExcludedFromBuild>
|
118
|
+
</ClCompile>
|
119
|
+
<ClCompile Include="pch.cpp">
|
120
|
+
<PrecompiledHeader>Create</PrecompiledHeader>
|
121
|
+
</ClCompile>
|
122
|
+
<ClCompile Include="ReactPackageProvider.cpp">
|
123
|
+
<DependentUpon>ReactPackageProvider.idl</DependentUpon>
|
124
|
+
</ClCompile>
|
125
|
+
<ClCompile Include="$(GeneratedFilesDir)module.g.cpp" />
|
126
|
+
</ItemGroup>
|
127
|
+
<ItemGroup>
|
128
|
+
<Midl Include="ReactPackageProvider.idl" />
|
129
|
+
</ItemGroup>
|
130
|
+
<ItemGroup>
|
131
|
+
<ResourceCompile Include="ReactNativeTcpWindows.rc" />
|
132
|
+
</ItemGroup>
|
133
|
+
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
|
134
|
+
<ImportGroup Label="ReactNativeWindowsTargets">
|
135
|
+
<Import Project="$(ReactNativeWindowsDir)\PropertySheets\External\Microsoft.ReactNative.CppLib.targets" Condition="Exists('$(ReactNativeWindowsDir)\PropertySheets\External\Microsoft.ReactNative.CppLib.targets')" />
|
136
|
+
</ImportGroup>
|
137
|
+
<ItemGroup>
|
138
|
+
</ItemGroup>
|
139
|
+
<Target Name="EnsureReactNativeWindowsTargets" BeforeTargets="PrepareForBuild">
|
140
|
+
<PropertyGroup>
|
141
|
+
<ErrorText>This project references targets in your node_modules\react-native-windows folder. The missing file is {0}.</ErrorText>
|
142
|
+
</PropertyGroup>
|
143
|
+
<Error Condition="!Exists('$(ReactNativeWindowsDir)\PropertySheets\External\Microsoft.ReactNative.CppLib.props')" Text="$([System.String]::Format('$(ErrorText)', '$(ReactNativeWindowsDir)\PropertySheets\External\Microsoft.ReactNative.CppLib.props'))" />
|
144
|
+
<Error Condition="!Exists('$(ReactNativeWindowsDir)\PropertySheets\External\Microsoft.ReactNative.CppLib.targets')" Text="$([System.String]::Format('$(ErrorText)', '$(ReactNativeWindowsDir)\PropertySheets\External\Microsoft.ReactNative.CppLib.targets'))" />
|
145
|
+
</Target>
|
146
|
+
</Project>
|
@@ -0,0 +1,44 @@
|
|
1
|
+
<?xml version="1.0" encoding="utf-8"?>
|
2
|
+
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
3
|
+
<ItemGroup>
|
4
|
+
<Filter Include="Source Files">
|
5
|
+
<UniqueIdentifier>{4FC737F1-C7A5-4376-A066-2A32D752A2FF}</UniqueIdentifier>
|
6
|
+
<Extensions>cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
|
7
|
+
</Filter>
|
8
|
+
<Filter Include="Header Files">
|
9
|
+
<UniqueIdentifier>{93995380-89BD-4b04-88EB-625FBE52EBFB}</UniqueIdentifier>
|
10
|
+
<Extensions>h;hh;hpp;hxx;hm;inl;inc;ipp;xsd</Extensions>
|
11
|
+
</Filter>
|
12
|
+
<Filter Include="Resource Files">
|
13
|
+
<UniqueIdentifier>{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}</UniqueIdentifier>
|
14
|
+
<Extensions>rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms</Extensions>
|
15
|
+
</Filter>
|
16
|
+
</ItemGroup>
|
17
|
+
<ItemGroup>
|
18
|
+
<ClInclude Include="targetver.h">
|
19
|
+
<Filter>Header Files</Filter>
|
20
|
+
</ClInclude>
|
21
|
+
<ClInclude Include="resource.h">
|
22
|
+
<Filter>Header Files</Filter>
|
23
|
+
</ClInclude>
|
24
|
+
<ClInclude Include="ReactNativeTcpWindows.h">
|
25
|
+
<Filter>Header Files</Filter>
|
26
|
+
</ClInclude>
|
27
|
+
<ClInclude Include="pch.h">
|
28
|
+
<Filter>Header Files</Filter>
|
29
|
+
</ClInclude>
|
30
|
+
</ItemGroup>
|
31
|
+
<ItemGroup>
|
32
|
+
<ClCompile Include="ReactNativeTcpWindows.cpp">
|
33
|
+
<Filter>Source Files</Filter>
|
34
|
+
</ClCompile>
|
35
|
+
<ClCompile Include="pch.cpp">
|
36
|
+
<Filter>Source Files</Filter>
|
37
|
+
</ClCompile>
|
38
|
+
</ItemGroup>
|
39
|
+
<ItemGroup>
|
40
|
+
<ResourceCompile Include="ReactNativeTcpWindows.rc">
|
41
|
+
<Filter>Resource Files</Filter>
|
42
|
+
</ResourceCompile>
|
43
|
+
</ItemGroup>
|
44
|
+
</Project>
|
@@ -0,0 +1,20 @@
|
|
1
|
+
#include "pch.h"
|
2
|
+
|
3
|
+
#include "ReactPackageProvider.h"
|
4
|
+
#if __has_include("ReactPackageProvider.g.cpp")
|
5
|
+
#include "ReactPackageProvider.g.cpp"
|
6
|
+
#endif
|
7
|
+
|
8
|
+
#include "ReactNativeTcpWindows.h"
|
9
|
+
|
10
|
+
using namespace winrt::Microsoft::ReactNative;
|
11
|
+
|
12
|
+
namespace winrt::ReactNativeTcpWindows::implementation
|
13
|
+
{
|
14
|
+
|
15
|
+
void ReactPackageProvider::CreatePackage(IReactPackageBuilder const &packageBuilder) noexcept
|
16
|
+
{
|
17
|
+
AddAttributedModules(packageBuilder, true);
|
18
|
+
}
|
19
|
+
|
20
|
+
} // namespace winrt::ReactNativeTcpWindows::implementation
|
@@ -0,0 +1,24 @@
|
|
1
|
+
#pragma once
|
2
|
+
|
3
|
+
#include "ReactPackageProvider.g.h"
|
4
|
+
|
5
|
+
using namespace winrt::Microsoft::ReactNative;
|
6
|
+
|
7
|
+
namespace winrt::ReactNativeTcpWindows::implementation
|
8
|
+
{
|
9
|
+
|
10
|
+
struct ReactPackageProvider : ReactPackageProviderT<ReactPackageProvider>
|
11
|
+
{
|
12
|
+
ReactPackageProvider() = default;
|
13
|
+
|
14
|
+
void CreatePackage(IReactPackageBuilder const &packageBuilder) noexcept;
|
15
|
+
};
|
16
|
+
|
17
|
+
} // namespace winrt::ReactNativeTcpWindows::implementation
|
18
|
+
|
19
|
+
namespace winrt::ReactNativeTcpWindows::factory_implementation
|
20
|
+
{
|
21
|
+
|
22
|
+
struct ReactPackageProvider : ReactPackageProviderT<ReactPackageProvider, implementation::ReactPackageProvider> {};
|
23
|
+
|
24
|
+
} // namespace winrt::ReactNativeTcpWindows::factory_implementation
|