Interface ISocket
Provides a common interface across platforms for UDP sockets used by this SSDP implementation.
Inherited Members
System.IDisposable.Dispose()
Assembly: MediaBrowser.Model.dll
public interface ISocket : IDisposable
Properties
Declaration
bool DontThrowOnCancel { get; set; }
Property Value
Type |
Description |
System.Boolean |
|
Declaration
IPAddress LocalIPAddress { get; }
Property Value
Type |
Description |
System.Net.IPAddress |
|
Methods
Declaration
IAsyncResult BeginReceive(byte[] buffer, int offset, int count, AsyncCallback callback)
Parameters
Type |
Name |
Description |
System.Byte[] |
buffer |
|
System.Int32 |
offset |
|
System.Int32 |
count |
|
System.AsyncCallback |
callback |
|
Returns
Type |
Description |
System.IAsyncResult |
|
Declaration
SocketReceiveResult EndReceive(IAsyncResult result)
Parameters
Type |
Name |
Description |
System.IAsyncResult |
result |
|
Returns
Declaration
int Receive(byte[] buffer, int offset, int count)
Parameters
Type |
Name |
Description |
System.Byte[] |
buffer |
|
System.Int32 |
offset |
|
System.Int32 |
count |
|
Returns
Type |
Description |
System.Int32 |
|
Declaration
Task<SocketReceiveResult> ReceiveAsync(byte[] buffer, int offset, int count, CancellationToken cancellationToken)
Parameters
Type |
Name |
Description |
System.Byte[] |
buffer |
|
System.Int32 |
offset |
|
System.Int32 |
count |
|
System.Threading.CancellationToken |
cancellationToken |
|
Returns
Sends a UDP message to a particular end point (uni or multicast).
Declaration
Task SendToAsync(byte[] buffer, int offset, int bytes, IPEndPoint endPoint, CancellationToken cancellationToken)
Parameters
Type |
Name |
Description |
System.Byte[] |
buffer |
|
System.Int32 |
offset |
|
System.Int32 |
bytes |
|
System.Net.IPEndPoint |
endPoint |
|
System.Threading.CancellationToken |
cancellationToken |
|
Returns
Type |
Description |
System.Threading.Tasks.Task |
|
Extension Methods