-
Notifications
You must be signed in to change notification settings - Fork 30
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: bugfix to send KeepAlive messages as text rather than binary
- Loading branch information
1 parent
460a300
commit a1cf136
Showing
2 changed files
with
11 additions
and
7 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
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 |
---|---|---|
@@ -1,14 +1,18 @@ | ||
using System; | ||
using System.Net.WebSockets; | ||
|
||
namespace Deepgram.Models | ||
{ | ||
internal readonly struct MessageToSend | ||
{ | ||
public MessageToSend(byte[] message) | ||
public MessageToSend(byte[] message, WebSocketMessageType type) | ||
{ | ||
Message = new ArraySegment<byte>(message); | ||
MessageType = type; | ||
} | ||
|
||
public ArraySegment<byte> Message { get; } | ||
public readonly ArraySegment<byte> Message { get; } | ||
Check failure on line 14 in Deepgram/Models/MessageToSend.cs GitHub Actions / build
Check failure on line 14 in Deepgram/Models/MessageToSend.cs GitHub Actions / build
Check failure on line 14 in Deepgram/Models/MessageToSend.cs GitHub Actions / test (6.0.x)
|
||
|
||
public readonly WebSocketMessageType MessageType { get; } | ||
Check failure on line 16 in Deepgram/Models/MessageToSend.cs GitHub Actions / build
Check failure on line 16 in Deepgram/Models/MessageToSend.cs GitHub Actions / build
Check failure on line 16 in Deepgram/Models/MessageToSend.cs GitHub Actions / test (6.0.x)
|
||
} | ||
} |