Class IpAddressAssignedEventArgs
Definition
- Namespace:
- Tizen.Network.WiFiDirect
- Assembly:
- Tizen.Network.WiFiDirect.dll
An extended EventArgs class which contains address properties of the peer when it connects to a group owner. This event is triggered when a peer device successfully connects to a Wi-Fi Direct group and receives IP address assignment.
C#Copypublic class IpAddressAssignedEventArgs : EventArgs
- Inheritance
-
objectSystem.EventArgsIpAddressAssignedEventArgs
Remarks
This event is raised by the IpAddressAssigned event. Use this event to get network configuration information when a peer joins the group:
- MAC address for device identification
- Assigned IP address for network communication
- Network interface address for routing
Example usage:
Copypeer.IpAddressAssigned += (sender, e) => { Console.WriteLine($"Peer {e.MacAddress} assigned IP: {e.IpAddress}"); Console.WriteLine($"Interface: {e.InterfaceAddress}"); // Now you can establish network communication with the peer // using the assigned IP address };
Properties
InterfaceAddress
The network interface address of the connected peer device. This is the network interface identifier used for routing and network configuration.
Declaration
C#Copypublic string InterfaceAddress { get; }
Property Value
| Type | Description |
|---|---|
| string | The network interface address string (e.g., "AA:BB:CC:DD:EE:FF"). |
Remarks
This event is raised by the IpAddressAssigned event. Use this event to get network configuration information when a peer joins the group:
- MAC address for device identification
- Assigned IP address for network communication
- Network interface address for routing
Example usage:
Copypeer.IpAddressAssigned += (sender, e) => { Console.WriteLine($"Peer {e.MacAddress} assigned IP: {e.IpAddress}"); Console.WriteLine($"Interface: {e.InterfaceAddress}"); // Now you can establish network communication with the peer // using the assigned IP address };
IpAddress
The IP address assigned to the connected peer device. This is the network address that can be used for socket communication with the peer.
Declaration
C#Copypublic string IpAddress { get; }
Property Value
| Type | Description |
|---|---|
| string | The IP address string (e.g., "192.168.49.2"). |
Remarks
This event is raised by the IpAddressAssigned event. Use this event to get network configuration information when a peer joins the group:
- MAC address for device identification
- Assigned IP address for network communication
- Network interface address for routing
Example usage:
Copypeer.IpAddressAssigned += (sender, e) => { Console.WriteLine($"Peer {e.MacAddress} assigned IP: {e.IpAddress}"); Console.WriteLine($"Interface: {e.InterfaceAddress}"); // Now you can establish network communication with the peer // using the assigned IP address };
MacAddress
The MAC address of the connected peer device. This uniquely identifies the peer device that received the IP assignment.
Declaration
C#Copypublic string MacAddress { get; }
Property Value
| Type | Description |
|---|---|
| string | The MAC address string of the peer device (e.g., "AA:BB:CC:DD:EE:FF"). |
Remarks
This event is raised by the IpAddressAssigned event. Use this event to get network configuration information when a peer joins the group:
- MAC address for device identification
- Assigned IP address for network communication
- Network interface address for routing
Example usage:
Copypeer.IpAddressAssigned += (sender, e) => { Console.WriteLine($"Peer {e.MacAddress} assigned IP: {e.IpAddress}"); Console.WriteLine($"Interface: {e.InterfaceAddress}"); // Now you can establish network communication with the peer // using the assigned IP address };