Skip to content

Commit

Permalink
Extended the IMarketDataFeed interface.
Browse files Browse the repository at this point in the history
  • Loading branch information
mgnsm committed May 10, 2022
1 parent 04a2736 commit 2c178b2
Show file tree
Hide file tree
Showing 2 changed files with 33 additions and 3 deletions.
30 changes: 30 additions & 0 deletions Source/Millistream.Streaming/IMarketDataFeed.cs
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,36 @@ public interface IMarketDataFeed<TCallbackUserData, TStatusCallbackUserData>
/// </summary>
long TimeDifferenceNs { get; }

/// <summary>
/// A comma separated list of the message digests that the client will offer to the server upon connect.
/// </summary>
public string MessageDigests { get; set; }

/// <summary>
/// A comma separated list of the encryption ciphers that the client will offer to the server upon connect.
/// </summary>
public string Ciphers { get; set; }

/// <summary>
/// The digest chosen by the server. Only available after <see cref="Connect"/> returns.
/// </summary>
string MessageDigest { get; }

/// <summary>
/// The cipher chosen by the server. Only available after <see cref="Connect"/> returns.
/// </summary>
string Cipher { get; }

/// <summary>
/// The number of seconds to wait before having to call <see cref="Consume(int)"/>.
/// </summary>
public int Timeout { get; }

/// <summary>
/// Enables or disables delay-mode in where the server adds the intended delay to each message sent. This also enables the client to set the intended delay of the messages the client sends to the server. It's disabled by default.
/// </summary>
public bool HandleDelay { get; set; }

/// <summary>
/// Consumes data sent from the server. If there currently is no data the function waits for <paramref name="timeout"/> number of seconds, if <paramref name="timeout"/> is zero (0) the function will return immediately. If <paramref name="timeout"/> is negative then the wait period is treated as number of microseconds instead of number of seconds (i.e. -1000 will wait a maximum of 1000µs).
/// </summary>
Expand Down
6 changes: 3 additions & 3 deletions Source/Millistream.Streaming/MarketDataFeed.cs
Original file line number Diff line number Diff line change
Expand Up @@ -312,21 +312,21 @@ public string Ciphers
}

/// <summary>
/// Returns the digest chosen by the server, only available after <see cref="Connect"/> returns.
/// The digest chosen by the server. Only available after <see cref="Connect"/> returns.
/// </summary>
/// <exception cref="InvalidOperationException">The native value of the <see cref="MDF_OPTION.MDF_OPT_CRYPT_DIGEST"/> option cannot be fetched.</exception>
/// <exception cref="ObjectDisposedException">The <see cref="MarketDataFeed{TCallbackData,TStatusCallbackData}"/> instance has been disposed.</exception>
public string MessageDigest => GetStringProperty(MDF_OPTION.MDF_OPT_CRYPT_DIGEST);

/// <summary>
/// Returns the cipher chosen by the server, only available after <see cref="Connect"/> returns.
/// The cipher chosen by the server. Only available after <see cref="Connect"/> returns.
/// </summary>
/// <exception cref="InvalidOperationException">The native value of the <see cref="MDF_OPTION.MDF_OPT_CRYPT_CIPHER"/> option cannot be fetched.</exception>
/// <exception cref="ObjectDisposedException">The <see cref="MarketDataFeed{TCallbackData,TStatusCallbackData}"/> instance has been disposed.</exception>
public string Cipher => GetStringProperty(MDF_OPTION.MDF_OPT_CRYPT_CIPHER);

/// <summary>
/// Returns the number of seconds to wait before having to call <see cref="Consume(int)"/>.
/// The number of seconds to wait before having to call <see cref="Consume(int)"/>.
/// </summary>
/// <exception cref="InvalidOperationException">The native value of the <see cref="MDF_OPTION.MDF_OPT_TIMEOUT"/> option cannot be fetched.</exception>
/// <exception cref="ObjectDisposedException">The <see cref="MarketDataFeed{TCallbackData,TStatusCallbackData}"/> instance has been disposed.</exception>
Expand Down

0 comments on commit 2c178b2

Please sign in to comment.