From: js6pak Date: Wed, 31 Mar 2021 11:37:49 +0000 (+0200) Subject: Migrate to new csproj format X-Git-Tag: 1.0.0~8 X-Git-Url: https://git.deb.at/?a=commitdiff_plain;h=11c5b9797dd2c99fbf5c58a232b7b26a7256d4d7;p=rhonda%2Fimpostor.hazel.git Migrate to new csproj format --- diff --git a/Hazel Networking Protocol.docx b/Hazel Networking Protocol.docx deleted file mode 100644 index 615c0cd..0000000 Binary files a/Hazel Networking Protocol.docx and /dev/null differ diff --git a/Hazel.UnitTests/Hazel.UnitTests.csproj b/Hazel.UnitTests/Hazel.UnitTests.csproj index 19560de..7c4ee6c 100644 --- a/Hazel.UnitTests/Hazel.UnitTests.csproj +++ b/Hazel.UnitTests/Hazel.UnitTests.csproj @@ -1,120 +1,19 @@ - - + + - Debug - AnyCPU - {1394E4CA-E17A-42F5-9216-8046ACA8D16B} - Library - Properties - Hazel.UnitTests - Hazel.UnitTests - v4.5 - 512 - {3AC096D0-A1C2-E12C-1390-A8335801FDAB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} - 10.0 - $(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion) - $(ProgramFiles)\Common Files\microsoft shared\VSTT\$(VisualStudioVersion)\UITestExtensionPackages - False - UnitTest - + net5.0 + false - - true - full - false - bin\Debug\ - DEBUG;TRACE - prompt - 4 - false - false - - - pdbonly - true - bin\Release\ - TRACE - prompt - 4 - false - - - - ..\packages\BouncyCastle.1.8.9\lib\BouncyCastle.Crypto.dll - - - - - - - - - - - - - False - - - - - - - - - - - - - - - - - - - - - - - - - - - + - - {02cfbd30-d77d-400f-94b2-700f60efdd7f} - Hazel - + + + + + - + - - - - - False - - - False - - - False - - - False - - - - - - - - \ No newline at end of file + + diff --git a/Hazel.UnitTests/Properties/AssemblyInfo.cs b/Hazel.UnitTests/Properties/AssemblyInfo.cs deleted file mode 100644 index c6e5128..0000000 --- a/Hazel.UnitTests/Properties/AssemblyInfo.cs +++ /dev/null @@ -1,36 +0,0 @@ -using System.Reflection; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; - -// General Information about an assembly is controlled through the following -// set of attributes. Change these attribute values to modify the information -// associated with an assembly. -[assembly: AssemblyTitle("Hazel.UnitTests")] -[assembly: AssemblyDescription("")] -[assembly: AssemblyConfiguration("")] -[assembly: AssemblyCompany("")] -[assembly: AssemblyProduct("Hazel.UnitTests")] -[assembly: AssemblyCopyright("Copyright © 2016")] -[assembly: AssemblyTrademark("")] -[assembly: AssemblyCulture("")] - -// Setting ComVisible to false makes the types in this assembly not visible -// to COM components. If you need to access a type in this assembly from -// COM, set the ComVisible attribute to true on that type. -[assembly: ComVisible(false)] - -// The following GUID is for the ID of the typelib if this project is exposed to COM -[assembly: Guid("e88c2226-946e-4f00-9336-8d8d7946ac23")] - -// Version information for an assembly consists of the following four values: -// -// Major Version -// Minor Version -// Build Number -// Revision -// -// You can specify all the values or you can default the Build and Revision Numbers -// by using the '*' as shown below: -// [assembly: AssemblyVersion("1.0.*")] -[assembly: AssemblyVersion("1.0.0.0")] -[assembly: AssemblyFileVersion("1.0.0.0")] diff --git a/Hazel.sln b/Hazel.sln index bc27b0a..420e6a1 100644 --- a/Hazel.sln +++ b/Hazel.sln @@ -7,6 +7,8 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Hazel", "Hazel\Hazel.csproj EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Hazel.UnitTests", "Hazel.UnitTests\Hazel.UnitTests.csproj", "{1394E4CA-E17A-42F5-9216-8046ACA8D16B}" EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Impostor.Api", "..\Impostor.Api\Impostor.Api.csproj", "{9932ED5B-4B76-451D-84C6-BE060DF1FD20}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU @@ -21,6 +23,10 @@ Global {1394E4CA-E17A-42F5-9216-8046ACA8D16B}.Debug|Any CPU.Build.0 = Debug|Any CPU {1394E4CA-E17A-42F5-9216-8046ACA8D16B}.Release|Any CPU.ActiveCfg = Release|Any CPU {1394E4CA-E17A-42F5-9216-8046ACA8D16B}.Release|Any CPU.Build.0 = Release|Any CPU + {9932ED5B-4B76-451D-84C6-BE060DF1FD20}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {9932ED5B-4B76-451D-84C6-BE060DF1FD20}.Debug|Any CPU.Build.0 = Debug|Any CPU + {9932ED5B-4B76-451D-84C6-BE060DF1FD20}.Release|Any CPU.ActiveCfg = Release|Any CPU + {9932ED5B-4B76-451D-84C6-BE060DF1FD20}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE diff --git a/Hazel/Hazel.csproj b/Hazel/Hazel.csproj index 9b15a5a..4939380 100644 --- a/Hazel/Hazel.csproj +++ b/Hazel/Hazel.csproj @@ -1,131 +1,24 @@ - - - + + - Debug - AnyCPU - {02CFBD30-D77D-400F-94B2-700F60EFDD7F} - Library - Properties - Hazel - Hazel - v4.5 - 512 - - - - true - full - false - bin\Debug\ - DEBUG;TRACE - prompt - 4 - - - true - false - 7.3 - - - portable - true - bin\Release\ - TRACE - prompt - 4 - - true - false - 7.3 - true - - - true - - - - - - - true - bin\DebugClient\ - DEBUG;TRACE - true - full - AnyCPU - prompt - MinimumRecommendedRules.ruleset - 7.3 + net5.0 + HAZEL_BAG + + + + <_Parameter1>Hazel.UnitTests + + + - - - - - - + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Code - - - - - - - - + - - - \ No newline at end of file + + diff --git a/Hazel/Properties/AssemblyInfo.cs b/Hazel/Properties/AssemblyInfo.cs deleted file mode 100644 index 3d0a292..0000000 --- a/Hazel/Properties/AssemblyInfo.cs +++ /dev/null @@ -1,36 +0,0 @@ -using System.Reflection; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; - -// General Information about an assembly is controlled through the following -// set of attributes. Change these attribute values to modify the information -// associated with an assembly. -[assembly: AssemblyTitle("Hazel")] -[assembly: AssemblyDescription("")] -[assembly: AssemblyConfiguration("")] -[assembly: AssemblyCompany("")] -[assembly: AssemblyProduct("Hazel")] -[assembly: AssemblyCopyright("Copyright © 2020")] -[assembly: AssemblyTrademark("")] -[assembly: AssemblyCulture("")] - -// Setting ComVisible to false makes the types in this assembly not visible -// to COM components. If you need to access a type in this assembly from -// COM, set the ComVisible attribute to true on that type. -[assembly: ComVisible(false)] - -// The following GUID is for the ID of the typelib if this project is exposed to COM -[assembly: Guid("f3935f38-a904-40c7-ab9b-8d01aefe0489")] - -// Version information for an assembly consists of the following four values: -// -// Major Version -// Minor Version -// Build Number -// Revision -// -[assembly: AssemblyVersion("1.0.1.0")] -[assembly: AssemblyFileVersion("1.0.0.0")] - -// Show internals to unit testing assembly so it can test -[assembly:InternalsVisibleTo("Hazel.UnitTests")] \ No newline at end of file diff --git a/README.md b/README.md index 302ab31..6907485 100644 --- a/README.md +++ b/README.md @@ -1,41 +1,3 @@ -#### Hazel Networking is a low-level networking library for C# providing connection-oriented, message based communication via UDP and RUDP. +# Impostor.Hazel -The aim of this fork is to create a simple interface for ultra-fast connection-based UDP communication for games. - ------ - -## Features -- UDP and Reliable UDP. -- UDP Broadcast for local-multiplayer. -- Completely thread safe. -- All protocols are connection oriented (similar to TCP) and message based (similar to UDP) -- IPv4 and IPv6 support -- Automatic statistics about data passing in and out of connections -- Designed to be as fast and leightweight as possible - ------ - -### This fork has been heavily modified from the original to reduce allocations, copies, and locking. As such, it's fairly stable, but not guaranteed. However, my game Among Us currently runs on it with over 500k MAU, so that counts for something. - ------ - -HTML documentation, tutorials and quickstarts from the DarkRift Website [here](http://www.darkriftnetworking.com/Hazel/Docs) should be relatively accurate; but I doubt the original creator will want support calls for this fork. I can provide some limited support if you create an issue. - -I have changed some interfaces in "non-intuitive ways", it is my hope that [this example repo](https://github.com/willardf/Hazel-Examples) will be able to help users get started. - -If you want to make improvements, I am open to pull requests. If you find bugs, feel free raise issues. - ------ - -## Building Hazel - -To build Hazel open [solution file](Hazel.sln) using your favourite C# IDE (I use Visual Studio 2017) and then build as you would any other project. - ------ - -## Tips for using Hazel with Unity - - * Unity doesn't like other threads messing with GameObjects. This isn't a problem for tasks like relaying information. But for tasks like spawning GameObjects on clients or correcting physics, you will want to have a thread safe list of events that are run and cleared during Update or FixedUpdate. - * A List+lock(object) is fine because you have many writers, one reader and Hazel doesn't guarantee event order. - * A ConcurrentBag is not a bad choice, but you will have to do something special to keep the Update method from hanging if you get an overwhelming number of new events (which suggests problems with your code elsewhere). - * I also recommend using the ConnectAsync method in a Coroutine that waits for State to change so you don't hang the game while connecting. +Fork of Hazel made for [Impostor](https://github.com/Impostor/Impostor)