Added RPC channel and guild entities, Get and Select methods

This commit is contained in:
RogueException
2016-10-08 02:37:04 -03:00
parent f584bd6e28
commit 16c67e79e9
39 changed files with 852 additions and 105 deletions

View File

@@ -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)