Skip to main content

Interface IUdpSocket

Assembly: Discord.Net.Core.dll​
View Source​
Declaration
public interface IUdpSocket : IDisposable

Properties​

Port​

View Source​
Declaration
ushort Port { get; }

Methods​

SetCancelToken(CancellationToken)​

View Source​
Declaration
void SetCancelToken(CancellationToken cancelToken)
Parameters​
TypeName
System.Threading.CancellationTokencancelToken

SetDestination(String, Int32)​

View Source​
Declaration
void SetDestination(string ip, int port)
Parameters​
TypeName
System.Stringip
System.Int32port

StartAsync()​

View Source​
Declaration
Task StartAsync()
Returns​

System.Threading.Tasks.Task

StopAsync()​

View Source​
Declaration
Task StopAsync()
Returns​

System.Threading.Tasks.Task

SendAsync(Byte[], Int32, Int32)​

View Source​
Declaration
Task SendAsync(byte[] data, int index, int count)
Returns​

System.Threading.Tasks.Task

Parameters​
TypeName
System.Byte[]data
System.Int32index
System.Int32count

Events​

ReceivedDatagram​

View Source​
Declaration
event Func<byte[], int, int, Task> ReceivedDatagram
Event Type​

System.Func<System.Byte[],System.Int32,System.Int32,System.Threading.Tasks.Task>