class NetworkControl
package digigun.sys.network
Class for advanced network control and diagnostics.
Static methods
staticbindToInterface(socket:Socket, interfaceName:String):Bool
Binds a standard Haxe Socket to a specific network interface by name.
Note: On Windows, this is currently a no-op/returns false as it requires different logic (binding to specific IP).
Parameters:
socket | The Haxe sys.net.Socket to bind. |
|---|---|
interfaceName | The OS name of the interface (e.g. "en0", "eth0"). |
Returns:
True if successful.
staticgetArpTable():Array<ArpEntry>
Attempts to retrieve the system ARP table.
Returns:
Array of ArpEntry objects.
staticsetSocketOptionBool(socket:Socket, level:Int, option:Int, value:Bool):Bool
Sets a boolean socket option.
Parameters:
socket | The Haxe sys.net.Socket. |
|---|---|
level | The protocol level. |
option | The option name. |
value | The boolean value. |
Returns:
True if successful.
staticsetSocketOptionInt(socket:Socket, level:Int, option:Int, value:Int):Bool
Sets an integer socket option.
Parameters:
socket | The Haxe sys.net.Socket. |
|---|---|
level | The protocol level (e.g., SocketOption.SOL_SOCKET). |
option | The option name (e.g., SocketOption.SO_REUSEADDR). |
value | The integer value. |
Returns:
True if successful.