Interface INetworkManager
Assembly: MediaBrowser.Common.dll
public interface INetworkManager
Properties
Declaration
Func<string[]> LocalSubnetsFn { get; set; }
Property Value
Type |
Description |
System.Func<System.String[]> |
|
Declaration
string[] RemoteApiAddresses { get; }
Property Value
Type |
Description |
System.String[] |
|
Declaration
string[] RemoteIPAddresses { get; }
Property Value
Type |
Description |
System.String[] |
|
Methods
Declaration
Task<IPAddress[]> GetHostAddressesAsync(string host, CancellationToken cancellationToken)
Parameters
Type |
Name |
Description |
System.String |
host |
|
System.Threading.CancellationToken |
cancellationToken |
|
Returns
Type |
Description |
System.Threading.Tasks.Task<System.Net.IPAddress[]> |
|
Declaration
IPAddress[] GetLocalIpAddresses()
Returns
Type |
Description |
System.Net.IPAddress[] |
|
Declaration
Task<IPAddress[]> GetLocalIpAddresses(CancellationToken cancellationToken)
Parameters
Type |
Name |
Description |
System.Threading.CancellationToken |
cancellationToken |
|
Returns
Type |
Description |
System.Threading.Tasks.Task<System.Net.IPAddress[]> |
|
Returns MAC Address from first Network Card in Computer
Declaration
List<string> GetMacAddresses()
Returns
Type |
Description |
System.Collections.Generic.List<System.String> |
[string] MAC Address
|
Gets available devices within the domain
Declaration
Task<List<FileSystemEntryInfo>> GetNetworkDevices(CancellationToken cancellationToken)
Parameters
Type |
Name |
Description |
System.Threading.CancellationToken |
cancellationToken |
|
Returns
Type |
Description |
System.Threading.Tasks.Task<System.Collections.Generic.List<FileSystemEntryInfo>> |
PC's in the Domain
|
Declaration
IEnumerable<NetworkShare> GetNetworkShares(string path)
Parameters
Type |
Name |
Description |
System.String |
path |
The path.
|
Returns
Type |
Description |
System.Collections.Generic.IEnumerable<NetworkShare> |
IEnumerable{NetworkShare}.
|
Gets a random port number that is currently available
Declaration
int GetRandomUnusedTcpPort()
Returns
Type |
Description |
System.Int32 |
System.Int32.
|
Declaration
int GetRandomUnusedUdpPort()
Returns
Type |
Description |
System.Int32 |
|
Declaration
bool IsAddressInSubnets(IPAddress address, string[] subnets)
Parameters
Type |
Name |
Description |
System.Net.IPAddress |
address |
|
System.String[] |
subnets |
|
Returns
Type |
Description |
System.Boolean |
|
Declaration
bool IsInLocalNetwork(IPAddress remoteAddress)
Parameters
Type |
Name |
Description |
System.Net.IPAddress |
remoteAddress |
|
Returns
Type |
Description |
System.Boolean |
|
Declaration
Task<bool> IsInLocalNetwork(IPAddress remoteAddress, CancellationToken cancellationToken)
Parameters
Type |
Name |
Description |
System.Net.IPAddress |
remoteAddress |
|
System.Threading.CancellationToken |
cancellationToken |
|
Returns
Type |
Description |
System.Threading.Tasks.Task<System.Boolean> |
|
Determines whether [is in local network] [the specified endpoint].
Declaration
Task<bool> IsInLocalNetwork(string endpoint, CancellationToken cancellationToken)
Parameters
Type |
Name |
Description |
System.String |
endpoint |
The endpoint.
|
System.Threading.CancellationToken |
cancellationToken |
The cancellation token.
|
Returns
Type |
Description |
System.Threading.Tasks.Task<System.Boolean> |
true if [is in local network] [the specified endpoint]; otherwise, false .
|
Determines whether [is in private address space] [the specified endpoint].
Declaration
bool IsInPrivateAddressSpace(ReadOnlySpan<char> endpoint)
Parameters
Type |
Name |
Description |
System.ReadOnlySpan<System.Char> |
endpoint |
The endpoint.
|
Returns
Type |
Description |
System.Boolean |
true if [is in private address space] [the specified endpoint]; otherwise, false .
|
Events
Declaration
event EventHandler NetworkChanged
Event Type
Type |
Description |
System.EventHandler |
|
Declaration
event EventHandler RemoteAddressesChanged
Event Type
Type |
Description |
System.EventHandler |
|
Extension Methods