Changeset d9b0936 in mod_gnutls


Ignore:
Timestamp:
Dec 2, 2019, 2:26:09 PM (11 months ago)
Author:
Fiona Klute <fiona.klute@…>
Branches:
master, proxy-ticket
Children:
4dfbedd
Parents:
fc8eefcd
Message:

https-test-client.py: Some more comments on the filter function

File:
1 edited

Legend:

Unmodified
Added
Removed
  • test/https-test-client.py

    rfc8eefcd rd9b0936  
    5757        cert_log = b'Processed 1 client X.509 certificates...\n'
    5858
     59        # Set the input to non-blocking mode
    5960        fd = in_stream.fileno()
    6061        fl = fcntl.fcntl(fd, fcntl.F_GETFL)
    6162        fcntl.fcntl(fd, fcntl.F_SETFL, fl | os.O_NONBLOCK)
     63
     64        # The poll object allows waiting for events on non-blocking IO
     65        # channels.
    6266        poller = select.poll()
    6367        poller.register(fd)
     
    6569        run_loop = True
    6670        while run_loop:
    67             # Critical: "event" is a bitwise OR of the POLL* constants
     71            # The returned tuples are file descriptor and event, but
     72            # we're only listening on one stream anyway, so we don't
     73            # need to check it here.
    6874            for x, event in poller.poll():
     75                # Critical: "event" is a bitwise OR of the POLL* constants
    6976                if event & select.POLLIN or event & select.POLLPRI:
    7077                    data = in_stream.read()
Note: See TracChangeset for help on using the changeset viewer.