Search
 
SCRIPT & CODE EXAMPLE
 

PYTHON

mk270 suits for programming reddit

/* s.connect((host, port)) method */
static PyObject *
sock_connect(PySocketSockObject *s, PyObject *addro)
{
    sock_addr_t addrbuf;
    int addrlen;
    int res;

    /* convert (host, port) tuple to C address */
    getsockaddrarg(s, addro, SAS2SA(&addrbuf), &addrlen);

    Py_BEGIN_ALLOW_THREADS
    res = connect(s->sock_fd, addr, addrlen);
    Py_END_ALLOW_THREADS

    /* error handling and so on .... */
}
Comment

mk270 suits for programming reddit

/* s.connect((host, port)) method */
static PyObject *
sock_connect(PySocketSockObject *s, PyObject *addro)
{
    sock_addr_t addrbuf;
    int addrlen;
    int res;

    /* convert (host, port) tuple to C address */
    getsockaddrarg(s, addro, SAS2SA(&addrbuf), &addrlen);

    Py_BEGIN_ALLOW_THREADS
    res = connect(s->sock_fd, addr, addrlen);
    Py_END_ALLOW_THREADS

    /* error handling and so on .... */
}
Comment

PREVIOUS NEXT
Code Example
Python :: python sumproduct excel 
Python :: Sequential Execution EC2 
Python :: import variables fron another file 
Python :: using glob module to search all html files in current directory in python 
Python :: dataframe ggplot rownames order 
Python :: cmd python script stay open 
Python :: Find element with class name in requests-html python 
Python :: Python NumPy squeeze function Syntax 
Python :: Python NumPy atleast_1d Function Example 02 
Python :: block size explained in python hashlib module 
Python :: brython sample 
Python :: differences between Pool.apply, Pool.apply_async, Pool.map and Pool.map_async. 
Python :: Python NumPy asarray_chkfinite Function Syntax 
Python :: Python NumPy row_stack Function Example with 1d array 
Python :: TemplateDoesNotExist at / 
Python :: mid point line drawing 
Python :: Python how to use __truediv__ 
Python :: Program to get number of consecutive repeated substring 
Python :: pandas use 3 columns for 2d distribution 
Python :: django admin auto update date field 
Python :: flatten a list using numpy and itertools 
Python :: penggunaan keys di python 
Python :: numpy extract decimal 
Python :: How to Export Sql Server Result to Excel in Python 
Python :: Simple GUI 
Python :: empty list 
Python :: Trying to set up flask with nginx and gunicorn 
Python :: how to make a typing effect in python 
Python :: Frog Jump time complexity 
Python :: function to find the mean of column in dataframe in python 
ADD CONTENT
Topic
Content
Source link
Name
9+1 =