예제 #1
0
 public static void EasyCleanup(CurlEasyHandle handle)
 {
     if (Environment.Is64BitProcess)
     {
         LibCurlNative.EasyCleanup64(handle);
     }
     else
     {
         LibCurlNative.EasyCleanup32(handle);
     }
 }
예제 #2
0
 public static void SListFreeAll(SListHandle handle)
 {
     if (Environment.Is64BitProcess)
     {
         LibCurlNative.SListFreeAll64(handle);
     }
     else
     {
         LibCurlNative.SListFreeAll32(handle);
     }
 }
예제 #3
0
 public static void EasyReset(CurlEasyHandle handle)
 {
     if (Environment.Is64BitProcess)
     {
         LibCurlNative.EasyReset64(handle);
     }
     else
     {
         LibCurlNative.EasyReset32(handle);
     }
 }
예제 #4
0
        public static CurlCode GlobalInit(CurlGlobal flags = CurlGlobal.Default)
        {
            lock (globalInitMutex) {
                // curl_global_init is reference counted, but I do manual reference counting in order to implement IsInitialized.

                ++globalInitRefCount;

                return(Environment.Is64BitProcess ?
                       LibCurlNative.GlobalInit64(flags) :
                       LibCurlNative.GlobalInit32(flags));
            }
        }
예제 #5
0
        public static void GlobalCleanup()
        {
            lock (globalInitMutex) {
                if (globalInitRefCount == 1)
                {
                    if (Environment.Is64BitProcess)
                    {
                        LibCurlNative.GlobalCleanup64();
                    }
                    else
                    {
                        LibCurlNative.GlobalCleanup32();
                    }
                }

                if (globalInitRefCount > 0)
                {
                    --globalInitRefCount;
                }
            }
        }
예제 #6
0
 public static CurlCode EasySetOpt(CurlEasyHandle handle, CurlOption option, ReadFunctionCallback value)
 {
     return(Environment.Is64BitProcess ?
            LibCurlNative.EasySetOpt64(handle, option, value) :
            LibCurlNative.EasySetOpt32(handle, option, value));
 }
예제 #7
0
 public static CurlEasyHandle EasyInit()
 {
     return(Environment.Is64BitProcess ?
            LibCurlNative.EasyInit64() :
            LibCurlNative.EasyInit32());
 }
예제 #8
0
 public static SListHandle SListAppend(SListHandle handle, string @string)
 {
     return(Environment.Is64BitProcess ?
            LibCurlNative.SListAppend64(handle, @string) :
            LibCurlNative.SListAppend32(handle, @string));
 }
예제 #9
0
 public static CurlCode EasyPerform(CurlEasyHandle handle)
 {
     return(Environment.Is64BitProcess ?
            LibCurlNative.EasyPerform64(handle) :
            LibCurlNative.EasyPerform32(handle));
 }