Initial Client/Server Communication
#1 Followed the MagicOnion quickstart guide, borrowing code from the chat sample app to get something working
This commit is contained in:
parent
52b0d4d8ff
commit
a0c8dbee72
493 changed files with 57790 additions and 3 deletions
57
Assets/Scripts/MessagePack/MessagePackCompression.cs
Normal file
57
Assets/Scripts/MessagePack/MessagePackCompression.cs
Normal file
|
|
@ -0,0 +1,57 @@
|
|||
// Copyright (c) All contributors. All rights reserved.
|
||||
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
|
||||
|
||||
namespace MessagePack
|
||||
{
|
||||
/// <summary>
|
||||
/// Identifies the various compression schemes which might be applied at the msgpack level.
|
||||
/// </summary>
|
||||
public enum MessagePackCompression
|
||||
{
|
||||
/// <summary>
|
||||
/// No compression is applied at the msgpack level.
|
||||
/// </summary>
|
||||
None,
|
||||
|
||||
/// <summary>
|
||||
/// Compresses an entire msgpack sequence as a single lz4 block format.
|
||||
/// This is the simple compression that achieves best compression ratio,
|
||||
/// at the cost of copying the entire sequence when necessary to get contiguous memory.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Uses msgpack type code ext99 and is compatible with v1 of this library.
|
||||
/// </remarks>
|
||||
/// <devremarks>
|
||||
/// See also ThisLibraryExtensionTypeCodes.Lz4Block
|
||||
/// </devremarks>
|
||||
Lz4Block,
|
||||
|
||||
/// <summary>
|
||||
/// Compresses an entire msgpack sequence as a array of lz4 block format.
|
||||
/// This is compressed/decompressed in chunks that do not consume LOH,
|
||||
/// but the compression ratio is slightly sacrificed.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Uses msgpack type code ext98 in array.
|
||||
/// </remarks>
|
||||
/// <devremarks>
|
||||
/// See also ThisLibraryExtensionTypeCodes.Lz4BlockArray
|
||||
/// </devremarks>
|
||||
Lz4BlockArray,
|
||||
}
|
||||
|
||||
#pragma warning disable SA1649 // File name should match first type name
|
||||
|
||||
/// <summary>
|
||||
/// Extensions for <see cref="MessagePackCompression"/>.
|
||||
/// </summary>
|
||||
internal static class MessagePackCompressionExtensions
|
||||
{
|
||||
public static bool IsCompression(this MessagePackCompression compression)
|
||||
{
|
||||
return compression != MessagePackCompression.None;
|
||||
}
|
||||
}
|
||||
|
||||
#pragma warning restore SA1649 // File name should match first type name
|
||||
}
|
||||
Loading…
Reference in a new issue