Class ICMPClient
ICMPClient class. Used to manage the ICMP connection to a client.
Inheritance
System.Object
ICMPClient
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
Assembly: Cosmos.System2.dll
Syntax
public class ICMPClient : IDisposable
Constructors
| Improve this Doc View SourceICMPClient()
Create new instance of the ICMPClient class.
Declaration
public ICMPClient()
Fields
| Improve this Doc View Sourcedestination
Destination address.
Declaration
protected Address destination
Field Value
Type | Description |
---|---|
Address |
rxBuffer
RX buffer queue.
Declaration
protected Queue<ICMPPacket> rxBuffer
Field Value
Type | Description |
---|---|
System.Collections.Generic.Queue<ICMPPacket> |
Methods
| Improve this Doc View SourceClose()
Close connection.
Declaration
public void Close()
Exceptions
Type | Condition |
---|---|
System.ArgumentOutOfRangeException | Thrown on fatal error (contact support). |
Connect(Address)
Connect to client.
Declaration
public void Connect(Address dest)
Parameters
Type | Name | Description |
---|---|---|
Address | dest | Destination address. |
Dispose()
Close Client
Declaration
public void Dispose()
Receive(ref EndPoint, Int32)
Receive data
Declaration
public int Receive(ref EndPoint source, int timeout = 5000)
Parameters
Type | Name | Description |
---|---|---|
EndPoint | source | Source end point. |
System.Int32 | timeout | timeout value, default 5000ms |
Returns
Type | Description |
---|---|
System.Int32 | Address from Domain Name |
Exceptions
Type | Condition |
---|---|
System.InvalidOperationException | Thrown on fatal error (contact support). |
ReceiveData(ICMPPacket)
Receive data from packet.
Declaration
public void ReceiveData(ICMPPacket packet)
Parameters
Type | Name | Description |
---|---|---|
ICMPPacket | packet | Packet to receive. |
Exceptions
Type | Condition |
---|---|
System.OverflowException | Thrown on fatal error (contact support). |
SendEcho()
Send ICMP Echo
Declaration
public void SendEcho()
Implements
System.IDisposable