Added RPC channel and guild entities, Get and Select methods
This commit is contained in:
@@ -154,6 +154,7 @@ namespace Discord.Net.WebSockets
|
||||
while (!cancelToken.IsCancellationRequested)
|
||||
{
|
||||
WebSocketReceiveResult socketResult = await _client.ReceiveAsync(buffer, cancelToken).ConfigureAwait(false);
|
||||
System.Diagnostics.Debug.WriteLine("Got " + socketResult.Count);
|
||||
byte[] result;
|
||||
int resultCount;
|
||||
|
||||
@@ -193,6 +194,7 @@ namespace Discord.Net.WebSockets
|
||||
result = buffer.Array;
|
||||
}
|
||||
|
||||
System.Diagnostics.Debug.WriteLine("Start");
|
||||
if (socketResult.MessageType == WebSocketMessageType.Text)
|
||||
{
|
||||
string text = Encoding.UTF8.GetString(result, 0, resultCount);
|
||||
@@ -200,6 +202,7 @@ namespace Discord.Net.WebSockets
|
||||
}
|
||||
else
|
||||
await BinaryMessage(result, 0, resultCount).ConfigureAwait(false);
|
||||
System.Diagnostics.Debug.WriteLine("Stop");
|
||||
}
|
||||
}
|
||||
catch (Win32Exception ex) when (ex.HResult == HR_TIMEOUT)
|
||||
|
||||
Reference in New Issue
Block a user