Class Lidgren::Network::NetUtility
ClassList > Lidgren > Network > NetUtility
Utility methods.
Public Static Properties
| Type | Name | 
|---|---|
| property double | Now | 
Public Functions
| Type | Name | 
|---|---|
| delegate void | ResolveAddressCallback (NetAddress adr) Resolve address callback. | 
| delegate void | ResolveEndPointCallback (NetEndPoint endPoint) Resolve endpoint callback. | 
Public Static Functions
| Type | Name | 
|---|---|
| int | BitsToHoldUInt (uint value) Returns how many bits are necessary to hold a certain number. | 
| int | BitsToHoldUInt64 (ulong value) Returns how many bits are necessary to hold a certain number. | 
| int | BytesToHoldBits (int numBits) Returns how many bytes are required to hold a certain number of bits. | 
| byte[] | ComputeSHAHash (byte[] bytes) | 
| byte[] | ComputeSHAHash (byte[] bytes, int offset, int count) | 
| IPAddress | CreateAddressFromBytes (byte[] bytes) | 
| IPAddress | GetBroadcastAddress () | 
| IPAddress | GetCachedBroadcastAddress () | 
| byte[] | GetMacAddressBytes () If available, returns the bytes of the physical (MAC) address for the first usable network interface. | 
| IPAddress | GetMyAddress (out IPAddress mask) Gets my local IPv4 address (not necessarily external) and subnet mask. | 
| ulong | GetPlatformSeed (int seedInc) | 
| int | GetWindowSize (NetDeliveryMethod method) Gets the window size used internally in the library for a certain delivery method. | 
| bool | IsLocal (NetEndPoint endPoint) Returns true if the endpoint supplied is on the same subnet as this host. | 
| bool | IsLocal (NetAddress remote) Returns true if the IPAddress supplied is on the same subnet as this host. | 
| string | MakeCommaDelimitedList< T > (IList< T > list) Creates a comma delimited string from a lite of items. | 
| NetEndPoint | Resolve (string ipOrHost, int port) Get IPv4 endpoint from notation (xxx.xxx.xxx.xxx) or hostname and port number. | 
| NetAddress | Resolve (string ipOrHost) Get IPv4 address from notation (xxx.xxx.xxx.xxx) or hostname. | 
| void | ResolveAsync (string ipOrHost, int port, ResolveEndPointCallback callback) Get IPv4 endpoint from notation (xxx.xxx.xxx.xxx) or hostname and port number (asynchronous version) | 
| void | ResolveAsync (string ipOrHost, ResolveAddressCallback callback) Get IPv4 address from notation (xxx.xxx.xxx.xxx) or hostname (asynchronous version) | 
| void | Sleep (int milliseconds) | 
| byte[] | ToByteArray (String hexString) Convert a hexadecimal string to a byte array. | 
| string | ToHexString (long data) Create a hex string from an Int64 value. | 
| string | ToHexString (byte[] data) Create a hex string from an array of bytes. | 
| string | ToHexString (byte[] data, int offset, int length) Create a hex string from an array of bytes. | 
| string | ToHumanReadable (long bytes) Converts a number of bytes to a shorter, more readable string representation. | 
Public Static Properties Documentation
property Now
Public Functions Documentation
function ResolveAddressCallback
function ResolveEndPointCallback
Public Static Functions Documentation
function BitsToHoldUInt
function BitsToHoldUInt64
function BytesToHoldBits
function ComputeSHAHash [1/2]
function ComputeSHAHash [2/2]
static inline byte[] Lidgren::Network::NetUtility::ComputeSHAHash (
    byte[] bytes,
    int offset,
    int count
) 
function CreateAddressFromBytes
function GetBroadcastAddress
function GetCachedBroadcastAddress
function GetMacAddressBytes
function GetMyAddress
function GetPlatformSeed
function GetWindowSize
function IsLocal [1/2]
function IsLocal [2/2]
function MakeCommaDelimitedList< T >
function Resolve [1/2]
function Resolve [2/2]
function ResolveAsync [1/2]
static inline void Lidgren::Network::NetUtility::ResolveAsync (
    string ipOrHost,
    int port,
    ResolveEndPointCallback callback
) 
function ResolveAsync [2/2]
static inline void Lidgren::Network::NetUtility::ResolveAsync (
    string ipOrHost,
    ResolveAddressCallback callback
) 
function Sleep
function ToByteArray
function ToHexString [1/3]
function ToHexString [2/3]
function ToHexString [3/3]
static inline string Lidgren::Network::NetUtility::ToHexString (
    byte[] data,
    int offset,
    int length
) 
function ToHumanReadable
The documentation for this class was generated from the following file api/unity-plugin/Scripts/Networking/Lidgren.Network/NetUtility.cs