Class DHCPClient
DHCPClient class. Used to manage the DHCP connection to a server.
Implements
System.IDisposable
Inherited Members
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Namespace: Cosmos.System.Network.IPv4.UDP.DHCP
Assembly: Cosmos.System2.dll
Syntax
public class DHCPClient : UdpClient, IDisposable
Constructors
| Improve this Doc View SourceDHCPClient()
Create new instance of the DHCPClient class.
Declaration
public DHCPClient()
Exceptions
Type | Condition |
---|---|
System.ArgumentOutOfRangeException | Thrown on fatal error (contact support). |
System.ArgumentException | Thrown if UdpClient with localPort 53 exists. |
Methods
| Improve this Doc View SourceDHCPServerAddress(NetworkDevice)
Get the IP address of the DHCP server
Declaration
public static Address DHCPServerAddress(NetworkDevice networkDevice)
Parameters
Type | Name | Description |
---|---|---|
NetworkDevice | networkDevice |
Returns
Type | Description |
---|---|
Address |
SendDiscoverPacket()
Send a packet to find the DHCP server and tell that we want a new IP address
Declaration
public int SendDiscoverPacket()
Returns
Type | Description |
---|---|
System.Int32 | time value (-1 = timeout) |
SendReleasePacket()
Send a packet to the DHCP server to make the address available again
Declaration
public void SendReleasePacket()
Implements
System.IDisposable