First commit
This commit is contained in:
commit
0ac6ff9196
26 changed files with 2836 additions and 0 deletions
19
LarpixVoice/Session.cs
Normal file
19
LarpixVoice/Session.cs
Normal file
|
|
@ -0,0 +1,19 @@
|
|||
using System.Net.WebSockets;
|
||||
using System.Threading.Channels;
|
||||
|
||||
namespace LarpixVoice;
|
||||
|
||||
public class Session
|
||||
{
|
||||
public WebSocket Socket { get; }
|
||||
public Channel<(byte[] Buffer, int Length)> SendQueue { get; }
|
||||
|
||||
public Session(WebSocket socket)
|
||||
{
|
||||
Socket = socket;
|
||||
SendQueue = Channel.CreateBounded<(byte[] Buffer, int Length)>(new BoundedChannelOptions(256)
|
||||
{
|
||||
FullMode = BoundedChannelFullMode.Wait
|
||||
});
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue