Esempio n. 1
0
 public static void OnDebug(CURLINFOTYPE infoType, String msg,
     Object extraData)
 {
     // print out received data only
     if (infoType == CURLINFOTYPE.CURLINFO_DATA_IN)
         Console.WriteLine(msg);    
 }
Esempio n. 2
0
        public void OnDebug_Status(CURLINFOTYPE infoType, String msg, Object extraData)
        {
            switch (infoType)
            {
            case CURLINFOTYPE.CURLINFO_HEADER_IN: if (msg.StartsWith("HTTP/1.1 "))
                {
                    headerLog.Append("\r\n");
                }
                headerLog.Append(msg); break;

            case CURLINFOTYPE.CURLINFO_HEADER_OUT: if (msg.EndsWith("ontinue\r\n\r\n"))
                {
                    headerLog.Append(msg.Substring(0, msg.Length - 2));
                }
                else
                {
                    headerLog.Append(msg);
                } break;

            case CURLINFOTYPE.CURLINFO_TEXT: connectLog.Append(msg); break;

            case CURLINFOTYPE.CURLINFO_DATA_IN:
            {
                answer.Append(GetAnswer(msg));
            }

            break;
            }
        }
Esempio n. 3
0
        public static void OnDebug(CURLINFOTYPE infoType, String msg, Object extraData)
        {
            Console.WriteLine(msg);
            TextWriter tw = new StreamWriter(@"C:\cookies\verbose.txt", true);

            tw.WriteLine(msg);
            tw.Close();
        }
 public static void OnDebug(CURLINFOTYPE infoType, String msg, Object extraData)
 {
     // print out received data only
     if (infoType == CURLINFOTYPE.CURLINFO_DATA_IN)
     {
         Console.WriteLine(msg);
     }
 }
Esempio n. 5
0
 public static void OnDebug(CURLINFOTYPE infoType,
                            String message, Object extraData)
 {
     if (debs != null)
     {
         string final = string.Empty;
         debs(infoType + ": " + message + final);
     }
 }
Esempio n. 6
0
        int internal_OnDebugCallback(IntPtr ptrCurl, CURLINFOTYPE infoType, string message, int size, IntPtr ptrUserdata)
        {
            if (_OnDebugCallback != null)
            {
                object userdata = GetObject(ptrUserdata);

                _OnDebugCallback(infoType, message, userdata);
            }
            return(0);
        }
Esempio n. 7
0
        // called by libcurlshim
        private static int DebugDelegate(CURLINFOTYPE infoType,
                                         IntPtr msgBuf, int msgBufSize, IntPtr parm)
        {
            GCHandle gch  = (GCHandle)parm;
            Easy     easy = (Easy)gch.Target;

            if (easy == null)
            {
                return(0);
            }
            if (easy.m_pfDebug == null)
            {
                return(0);
            }
            String message = Marshal.PtrToStringAnsi(msgBuf, msgBufSize);

            easy.m_pfDebug(infoType, message, easy.m_debugData);
            return(0);
        }
Esempio n. 8
0
        //Done added because of ADX

        public static void OnDebug(CURLINFOTYPE infoType, String msg,
                                   Object extraData)
        {
            Console.WriteLine(msg);
        }
Esempio n. 9
0
 public static void OnDebug(CURLINFOTYPE infoType,
     String message, Object extraData)
 {
     if (debs != null)
     {
         string final = string.Empty ;
         debs(infoType + ": " + message + final);
     }
 }
Esempio n. 10
0
 public static void OnDebug(CURLINFOTYPE infoType, String msg,
     Object extraData)
 {
     Console.WriteLine(msg);    
 }
Esempio n. 11
0
 // called by libcurlshim
 private static int DebugDelegate(CURLINFOTYPE infoType,
     IntPtr msgBuf, int msgBufSize, IntPtr parm)
 {
     GCHandle gch = (GCHandle)parm;
     Easy easy = (Easy)gch.Target;
     if (easy == null)
         return 0;
     if (easy.m_pfDebug == null)
         return 0;
     String message = Marshal.PtrToStringAnsi(msgBuf, msgBufSize);
     easy.m_pfDebug(infoType, message, easy.m_debugData);
     return 0;
 }
Esempio n. 12
0
        int internal_OnDebugCallback(IntPtr ptrCurl, CURLINFOTYPE infoType, string message, int size, IntPtr ptrUserdata)
        {
            if (_OnDebugCallback != null)
            {
                object userdata = GetObject(ptrUserdata);

                _OnDebugCallback(infoType, message, userdata);
            }
            return 0;
        }
Esempio n. 13
0
 //currently used in: sendRequest
 private void OnDebug(CURLINFOTYPE it, String msg, object extra)
 {
     //TODO: yeah, I probably want to flesh this out a bit more
     ichat.SendMessage(msg);
 }