-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Support for new Slic ping/pong frame protocol (#3348)
- Loading branch information
Showing
4 changed files
with
91 additions
and
17 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
15 changes: 15 additions & 0 deletions
15
src/IceRpc/Transports/Slic/Internal/OpaqueDataSliceDecoderExtensions.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
// Copyright (c) ZeroC, Inc. | ||
|
||
using IceRpc.Slice; | ||
|
||
namespace IceRpc.Transports.Slic.Internal; | ||
|
||
/// <summary>Provides an extension method for decoding a 64-bit opaque data value into a <see langword="long" | ||
/// />.</summary> | ||
public static class OpaqueDataSliceDecoderExtensions | ||
{ | ||
/// <summary>Decodes a 64-bit opaque data value.</summary> | ||
/// <param name="decoder">The Slice decoder.</param> | ||
/// <returns>The opaque data value decoded as a <see langword="long"/>.</returns> | ||
public static long DecodeOpaqueData(this ref SliceDecoder decoder) => decoder.DecodeInt64(); | ||
} |
15 changes: 15 additions & 0 deletions
15
src/IceRpc/Transports/Slic/Internal/OpaqueDataSliceEncoderExtensions.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
// Copyright (c) ZeroC, Inc. | ||
|
||
using IceRpc.Slice; | ||
|
||
namespace IceRpc.Transports.Slic.Internal; | ||
|
||
/// <summary>Provides an extension method for encoding a <see langword="long" /> into a 64-bit opaque data | ||
/// value.</summary> | ||
public static class OpaqueDataSliceEncoderExtensions | ||
{ | ||
/// <summary>Encodes a <see langword="long" /> as a 64-bit opaque data value.</summary> | ||
/// <param name="encoder">The Slice encoder.</param> | ||
/// <param name="value">The value to encode.</param> | ||
public static void EncodeOpaqueData(this ref SliceEncoder encoder, long value) => encoder.EncodeInt64(value); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters