OpenHome.Net.Core.NetworkAdapter.AddManagedCookie C# (CSharp) Method

AddManagedCookie() private method

private AddManagedCookie ( string aCookie, IntPtr aCString ) : CookieWrapper
aCookie string
aCString System.IntPtr
return CookieWrapper
        internal CookieWrapper AddManagedCookie(string aCookie, IntPtr aCString)
        {
            CookieWrapper cookie = new CookieWrapper(aCookie, aCString);
            lock (this)
            {
                iCookies.Add(cookie);
            }
            return cookie;
        }

Usage Example

Ejemplo n.º 1
0
 /// <summary>
 /// Query which subnet is in use.
 /// </summary>
 /// <param name="aCookie">Identifier for NetworkAdapter reference.  Must be used in a later call to NetworkAdapter.RemoveRef()</param>
 /// <returns>Network adapter.  Or null if no subnet is selected or we're running the device stack on all subnets.</returns>
 public static NetworkAdapter CurrentAdapter(string aCookie)
 {
     IntPtr cookie = InteropUtils.StringToHGlobalUtf8(aCookie);
     IntPtr nif = OhNetCurrentSubnetAdapter(cookie);
     if (nif == IntPtr.Zero)
         return null;
     NetworkAdapter n = new NetworkAdapter(nif);
     n.AddManagedCookie(aCookie, cookie);
     return n;
 }
All Usage Examples Of OpenHome.Net.Core.NetworkAdapter::AddManagedCookie