You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
22 lines
598 B
22 lines
598 B
using System;
|
|
using System.Threading;
|
|
using System.Threading.Tasks;
|
|
|
|
namespace Discord.Net.WebSockets
|
|
{
|
|
public interface IWebSocketClient : IDisposable
|
|
{
|
|
event Func<byte[], int, int, Task> BinaryMessage;
|
|
event Func<string, Task> TextMessage;
|
|
event Func<Exception, Task> Closed;
|
|
|
|
void SetHeader(string key, string value);
|
|
void SetCancelToken(CancellationToken cancelToken);
|
|
|
|
Task ConnectAsync(string host);
|
|
Task DisconnectAsync(int closeCode = 1000);
|
|
|
|
Task SendAsync(byte[] data, int index, int count, bool isText);
|
|
}
|
|
}
|