Skip to content

Commit

Permalink
fix tcp max message size defaults
Browse files Browse the repository at this point in the history
  • Loading branch information
mregen committed May 8, 2024
1 parent 663ed10 commit 7fdc963
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions Stack/Opc.Ua.Core/Stack/Tcp/TcpMessageType.cs
Expand Up @@ -242,15 +242,15 @@ public static class TcpMessageLimits
/// <summary>
/// The default maximum chunk count for Request and Response messages.
/// </summary>
public const int DefaultMaxChunkCount = 32;
public const int DefaultMaxChunkCount = DefaultMaxMessageSize / MinBufferSize;

/// <summary>
/// The default maximum message size.
/// </summary>
/// <remarks>
/// This default is for the Tcp transport. <see cref="DefaultEncodingLimits.MaxMessageSize"/> for the generic default.
/// </remarks>
public const int DefaultMaxMessageSize = DefaultMaxChunkCount * DefaultMaxBufferSize;
public const int DefaultMaxMessageSize = 0x10000 * 16;

/// <summary>
/// The default maximum message size for the discovery channel.
Expand Down
2 changes: 1 addition & 1 deletion Stack/Opc.Ua.Core/Types/Utils/DefaultEncodingLimits.cs
Expand Up @@ -38,7 +38,7 @@ public static class DefaultEncodingLimits
/// <summary>
/// The maximum length for any Message.
/// </summary>
public static readonly int MaxMessageSize = UInt16.MaxValue * 32;
public static readonly int MaxMessageSize = 0x10000 * 16;

/// <summary>
/// The maximum nesting level accepted while encoding or decoding objects.
Expand Down

0 comments on commit 7fdc963

Please sign in to comment.