Module Import alias Import alias Import alias Import alias Import alias Import alias Import alias Import alias ImportFrom alias ImportFrom alias ClassDef bases body Expr Str FunctionDef arguments args NameParam NameParam defaults body Raise Call NameLoad decorator_list FunctionDef arguments args NameParam defaults body Raise Call NameLoad decorator_list FunctionDef arguments args NameParam defaults body Raise Call NameLoad decorator_list decorator_list ClassDef bases NameLoad body Expr Str FunctionDef arguments args NameParam NameParam defaults body Assign AttributeStore NameLoad attr Call NameLoad Call AttributeLoad NameLoad attr Str Assign AttributeStore NameLoad attr Call AttributeLoad NameLoad attr NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body Return Call NameLoad Call AttributeLoad Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad attr Str decorator_list FunctionDef arguments args NameParam defaults body Return AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam defaults body Pass decorator_list decorator_list ClassDef bases body Expr Str FunctionDef arguments args NameParam NameParam NameParam NameParam defaults body Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr Dict Assign AttributeStore NameLoad attr Dict Assign AttributeStore NameLoad attr Call AttributeLoad NameLoad attr Assign AttributeStore NameLoad attr Num Assign AttributeStore NameLoad attr Num Assign AttributeStore NameLoad attr Num Assign AttributeStore NameLoad attr Num Assign AttributeStore NameLoad attr AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam defaults body Return BinOpSub Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr decorator_list decorator_list ClassDef bases AttributeLoad NameLoad attr body FunctionDef arguments args NameParam NameParam NameParam NameParam NameParam NameParam defaults body Expr Str Assign AttributeStore NameLoad attr Call NameLoad SubscriptLoad NameLoad Index Str Assign AttributeStore NameLoad attr NameLoad Expr Call AttributeLoad NameLoad attr Assign AttributeStore NameLoad attr Call NameLoad SubscriptLoad NameLoad Index Str Assign AttributeStore NameLoad attr AttributeLoad NameLoad attr Assign AttributeStore NameLoad attr Num Assign AttributeStore NameLoad attr Num Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad Expr Call AttributeLoad NameLoad attr BinOpMod Str TupleLoad Call NameLoad NameLoad Call NameLoad NameLoad Assign NameStore AttributeLoad NameLoad attr If Call NameLoad Call AttributeLoad NameLoad attr SubscriptLoad NameLoad Index Num AttributeLoad NameLoad attr body Assign NameStore AttributeLoad NameLoad attr Assign AttributeStore NameLoad attr TupleLoad Call AttributeLoad SubscriptLoad AttributeLoad NameLoad attr Index Num attr Str Str SubscriptLoad AttributeLoad NameLoad attr Index Num Assign AttributeStore NameLoad attr Call NameLoad AttributeLoad NameLoad attr AttributeLoad NameLoad attr AttributeLoad NameLoad attr TryExcept body Assign AttributeStore NameLoad attr Call AttributeLoad NameLoad attr handlers ExceptHandler type NameLoad name NameStore body Expr Call AttributeLoad NameLoad attr BinOpMod Str NameLoad Assign AttributeStore AttributeLoad NameLoad attr attr Dict Str Str AttributeLoad NameLoad attr Call NameLoad NameLoad Assign AttributeStore NameLoad attr Call AttributeLoad NameLoad attr NameLoad AttributeLoad NameLoad attr Expr Call AttributeLoad AttributeLoad NameLoad attr attr TupleLoad Call NameLoad SubscriptLoad NameLoad Index Num Num Expr Call AttributeLoad Call NameLoad attr decorator_list FunctionDef arguments args NameParam defaults body Expr Str Assign AttributeStore AttributeLoad NameLoad attr attr AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam NameParam defaults NameLoad body Expr Str TryFinally body TryExcept body Expr Call AttributeLoad NameLoad attr handlers ExceptHandler type NameLoad name NameStore body Expr Call AttributeLoad NameLoad attr BinOpMod Str NameLoad finalbody Expr Call AttributeLoad NameLoad attr Str If AttributeLoad NameLoad attr body Expr Call AttributeLoad AttributeLoad NameLoad attr attr Expr Call AttributeLoad NameLoad attr Str Expr Call AttributeLoad AttributeLoad NameLoad attr attr Expr Call AttributeLoad NameLoad attr Str If CompareIs NameLoad NameLoad body Expr Call AttributeLoad NameLoad attr Num decorator_list FunctionDef arguments args NameParam defaults body Expr Str Assign NameStore Dict Delete SubscriptDel AttributeLoad NameLoad attr Index Str Delete SubscriptDel AttributeLoad NameLoad attr Index Str Expr Call AttributeLoad NameLoad attr Call AttributeLoad Str attr AttributeLoad NameLoad attr AttributeLoad NameLoad attr Assign AttributeStore AttributeLoad NameLoad attr attr AttributeLoad NameLoad attr If BoolOpAnd CompareIn Str AttributeLoad NameLoad attr CompareEq SubscriptLoad AttributeLoad NameLoad attr Index Str Str body Assign AttributeStore NameLoad attr Call NameLoad AttributeLoad NameLoad attr orelse If BoolOpAnd CompareIn Str AttributeLoad NameLoad attr CompareNotEq SubscriptLoad AttributeLoad NameLoad attr Index Str Str body Assign AttributeStore AttributeLoad NameLoad attr attr Dict Str Str AttributeLoad NameLoad attr BinOpMod Str SubscriptLoad AttributeLoad NameLoad attr Index Str Expr Call AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr Return If CompareIn Str AttributeLoad NameLoad attr body Assign SubscriptStore NameLoad Index Str SubscriptLoad AttributeLoad NameLoad attr Index Str Assign AttributeStore NameLoad attr Call NameLoad SubscriptLoad AttributeLoad NameLoad attr Index Str If CompareIn Str AttributeLoad NameLoad attr body Assign AttributeStore NameLoad attr Call AttributeLoad AttributeLoad NameLoad attr attr If CompareIsNot AttributeLoad NameLoad attr NameLoad body Assign SubscriptStore NameLoad Index Str Call NameLoad AttributeLoad NameLoad attr If CompareIn Str AttributeLoad NameLoad attr body Assign SubscriptStore NameLoad Index Str SubscriptLoad AttributeLoad NameLoad attr Index Str Assign AttributeStore NameLoad attr Call NameLoad SubscriptLoad NameLoad Index Str Assign AttributeStore NameLoad attr NameLoad Expr Call AttributeLoad NameLoad attr Call AttributeLoad Str attr AttributeLoad NameLoad attr AttributeLoad NameLoad attr Assign AttributeStore AttributeLoad NameLoad attr attr AttributeLoad NameLoad attr Assign AttributeStore AttributeLoad NameLoad attr attr AttributeLoad NameLoad attr Assign AttributeStore AttributeLoad NameLoad attr attr AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam defaults body Expr Str If AttributeLoad AttributeLoad NameLoad attr attr body Expr Call AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr Return Expr Call AttributeLoad NameLoad attr If AttributeLoad NameLoad attr body Expr Call AttributeLoad NameLoad attr orelse Expr Call AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr While UnaryOpNot AttributeLoad NameLoad attr body TryExcept body Expr Call AttributeLoad NameLoad attr handlers ExceptHandler type TupleLoad NameLoad NameLoad body Expr Call AttributeLoad NameLoad attr Str Break Expr Call AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam defaults body Expr Str Expr Call AttributeLoad NameLoad attr If CompareGt Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr body Expr Call AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam defaults body Expr Str Assign AttributeStore NameLoad attr BinOpAdd Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam defaults body Expr Str TryExcept body Expr Call AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad NameLoad attr Assign TupleStore NameStore NameStore Call AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad NameLoad attr Expr Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad handlers ExceptHandler type AttributeLoad NameLoad attr body Assign AttributeStore AttributeLoad NameLoad attr attr Dict Str Str AttributeLoad NameLoad attr Str Assign AttributeStore NameLoad attr NameLoad Return If CompareNotEq NameLoad AttributeLoad NameLoad attr body Expr Call AttributeLoad NameLoad attr BinOpMod Str TupleLoad NameLoad AttributeLoad NameLoad attr Assign AttributeStore NameLoad attr NameLoad Return Assign TupleStore NameStore NameStore Call AttributeLoad NameLoad attr Str SubscriptLoad NameLoad Slice Num If CompareEq NameLoad AttributeLoad NameLoad attr body Assign AttributeStore AttributeLoad NameLoad attr attr Dict Str Str NameLoad Call AttributeLoad SubscriptLoad NameLoad Slice Num Num attr Str Str Expr Call AttributeLoad NameLoad attr BinOpMod Str SubscriptLoad AttributeLoad AttributeLoad NameLoad attr attr Index Str Expr Call AttributeLoad NameLoad attr Assign AttributeStore NameLoad attr NameLoad Return If CompareNotEq NameLoad AttributeLoad NameLoad attr body Expr Call AttributeLoad NameLoad attr BinOpMod Str TupleLoad AttributeLoad NameLoad attr NameLoad Assign AttributeStore AttributeLoad NameLoad attr attr Dict Str Str AttributeLoad NameLoad attr Str Expr Call AttributeLoad NameLoad attr Assign AttributeStore NameLoad attr NameLoad Return Expr Call AttributeLoad NameLoad attr NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Str If CompareNotEq NameLoad AttributeLoad NameLoad attr body Expr Call AttributeLoad NameLoad attr Str Expr Call AttributeLoad NameLoad attr Return Expr Call AttributeLoad NameLoad attr Assign AttributeStore NameLoad attr Num AugAssignAdd AttributeStore AttributeLoad NameLoad attr attr Num Expr Call AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam defaults body Assign AttributeStore AttributeLoad NameLoad attr attr Dict If CompareGtE AttributeLoad NameLoad attr AttributeLoad NameLoad attr body Expr Call AttributeLoad NameLoad attr AugAssignAdd AttributeStore NameLoad attr Num Return Assign AttributeStore AttributeLoad NameLoad attr attr Dict Str Str AttributeLoad NameLoad attr BinOpMod Str AttributeLoad NameLoad attr Assign AttributeStore NameLoad attr NameLoad Expr Call AttributeLoad NameLoad attr SubscriptLoad AttributeLoad AttributeLoad NameLoad attr attr Index Str decorator_list FunctionDef arguments args NameParam defaults body Expr Str AugAssignAdd AttributeStore NameLoad attr Num If CompareGt AttributeLoad NameLoad attr AttributeLoad NameLoad attr body Assign AttributeStore NameLoad attr Num TryExcept body Assign NameStore Num Assign AttributeStore NameLoad attr Call AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad NameLoad attr While BoolOpAnd CompareNotEq Call NameLoad AttributeLoad NameLoad attr AttributeLoad NameLoad attr CompareNotEq Call NameLoad AttributeLoad NameLoad attr NameLoad body Assign NameStore Call NameLoad AttributeLoad NameLoad attr AugAssignAdd AttributeStore NameLoad attr Call AttributeLoad AttributeLoad NameLoad attr attr BinOpSub AttributeLoad NameLoad attr NameLoad handlers ExceptHandler type NameLoad name NameStore body Expr Call AttributeLoad NameLoad attr BinOpMod Str NameLoad Assign AttributeStore AttributeLoad NameLoad attr attr Dict Str Str AttributeLoad NameLoad attr Str Expr Call AttributeLoad NameLoad attr Assign AttributeStore NameLoad attr NameLoad decorator_list FunctionDef arguments args NameParam defaults body Expr Str If CompareIs AttributeLoad NameLoad attr NameLoad body Assign AttributeStore NameLoad attr NameLoad Return Assign NameStore BinOpMod Str Call NameLoad AttributeLoad NameLoad attr Assign NameStore Call AttributeLoad NameLoad attr NameLoad AttributeLoad NameLoad attr AttributeLoad NameLoad attr AttributeLoad NameLoad attr Expr Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad AttributeLoad NameLoad attr AugAssignAdd AttributeStore AttributeLoad NameLoad attr attr Num AugAssignAdd AttributeStore AttributeLoad NameLoad attr attr Call NameLoad AttributeLoad NameLoad attr If CompareLt Call NameLoad AttributeLoad NameLoad attr AttributeLoad NameLoad attr body Assign AttributeStore NameLoad attr NameLoad decorator_list FunctionDef arguments args NameParam defaults body Expr Str Assign NameStore ListLoad For TupleStore NameStore NameStore Call AttributeLoad AttributeLoad NameLoad attr attr body Assign NameStore Call NameLoad BinOpMod Str TupleLoad Call NameLoad NameLoad Call NameLoad NameLoad Expr Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr NameLoad Call NameLoad Call AttributeLoad NameLoad attr Str Call NameLoad Call AttributeLoad NameLoad attr Str Expr Call AttributeLoad NameLoad attr Str Assign NameStore Call NameLoad Str Assign NameStore BinOpAdd Call AttributeLoad NameLoad attr NameLoad AttributeLoad NameLoad attr Call AttributeLoad Str attr NameLoad Expr Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad AttributeLoad NameLoad attr AugAssignAdd AttributeStore AttributeLoad NameLoad attr attr Num decorator_list FunctionDef arguments args NameParam defaults body Expr Str Assign NameStore Call NameLoad BinOpMod Str Call NameLoad Call AttributeLoad SubscriptLoad AttributeLoad AttributeLoad NameLoad attr attr Index Str attr Str Assign NameStore Call AttributeLoad NameLoad attr NameLoad AttributeLoad NameLoad attr SubscriptLoad AttributeLoad AttributeLoad NameLoad attr attr Index Str Call NameLoad Call AttributeLoad SubscriptLoad AttributeLoad AttributeLoad NameLoad attr attr Index Str attr Str Expr Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam defaults body Expr Str Raise Call NameLoad decorator_list decorator_list
N/A N/A io N/A ipaddress N/A logging N/A multiprocessing N/A socket N/A struct N/A sys N/A time N/A constants netascii NetasciiReader ResponseData N/A N/A N/A A base class representing a file-like object read N/A N/A self n N/A N/A N/A N/A NotImplementedError N/A size N/A N/A self N/A N/A N/A N/A NotImplementedError N/A close N/A N/A self N/A N/A N/A N/A NotImplementedError N/A N/A StringResponseData N/A ResponseData N/A N/A 
    A convenience subclass of `ResponseData` that transforms an input String
    into a file-like object.
     __init__ N/A N/A self string N/A N/A N/A N/A self _size N/A len N/A N/A string encode latin-1 N/A N/A self _reader N/A N/A io StringIO string N/A read N/A N/A self n N/A N/A N/A N/A bytes N/A N/A N/A N/A N/A self _reader read n encode latin-1 N/A size N/A N/A self N/A N/A N/A N/A self _size N/A close N/A N/A self N/A N/A N/A N/A N/A SessionStats N/A N/A N/A 
    SessionStats represents a digest of what happened during a session.
    Data inside the object gets populated at the end of a session.
    See `__init__` to see what you'll get.

    Note:
        You should never need to instantiate an object of this class.
        This object is what gets passed to the callback you provide to the
        `BaseHandler` class.
     __init__ N/A N/A self server_addr peer file_path N/A N/A N/A N/A self peer peer N/A N/A self server_addr server_addr N/A N/A self file_path file_path N/A N/A self error N/A N/A N/A self options N/A N/A N/A self start_time N/A N/A time time N/A N/A self packets_sent 0 N/A N/A self packets_acked 0 N/A N/A self bytes_sent 0 N/A N/A self retransmits 0 N/A N/A self blksize N/A constants DEFAULT_BLKSIZE N/A duration N/A N/A self N/A N/A N/A N/A N/A N/A time time N/A self start_time N/A N/A BaseHandler N/A N/A multiprocessing Process N/A __init__ N/A N/A self server_addr peer path options stats_callback N/A N/A N/A 
        Class that deals with talking to a single client. Being a subclass of
        `multiprocessing.Process` this will run in a separate process from the
        main process.

        Note:
            Do not use this class as is, inherit from it and override the
            `get_response_data` method which must return a subclass of
            `ResponseData`.

        Args:
            server_addr (tuple): (ip, port) of the server

            peer (tuple): (ip, port of) the peer

            path (string): requested file

            options (dict): a dictionary containing the options the client
                wants to negotiate.

            stats_callback (callable): a callable that will be executed at the
                end of the session. It gets passed an instance of the
                `SessionStats` class.
         N/A N/A self _timeout N/A int N/A options N/A default_timeout N/A N/A self _server_addr server_addr N/A N/A N/A self _reset_timeout N/A N/A self _retries N/A int N/A options N/A retries N/A N/A self _block_size N/A constants DEFAULT_BLKSIZE N/A N/A self _last_block_sent 0 N/A N/A self _retransmits 0 N/A N/A self _current_block None N/A N/A self _should_stop False N/A N/A self _path path N/A N/A self _options options N/A N/A self _stats_callback stats_callback N/A N/A self _response_data None N/A N/A self _peer peer N/A N/A N/A logging info N/A New connection from peer `%s` asking for path `%s` N/A N/A str peer N/A str path N/A family N/A socket AF_INET6 N/A N/A isinstance N/A N/A ipaddress ip_address N/A server_addr N/A 0 N/A ipaddress IPv4Address N/A N/A family N/A socket AF_INET N/A N/A self _peer N/A N/A N/A N/A N/A self _peer N/A 0 replace ::ffff: N/A N/A self _peer N/A 1 N/A N/A self _stats N/A SessionStats N/A self _server_addr N/A self _peer N/A self _path N/A N/A N/A N/A self _response_data N/A N/A self get_response_data N/A N/A N/A Exception N/A e N/A N/A N/A N/A logging exception N/A Caught exception: %s. e N/A N/A N/A self _stats error N/A error_code error_message N/A constants ERR_UNDEFINED N/A str e N/A N/A self _listener N/A N/A socket socket family N/A socket SOCK_DGRAM N/A N/A N/A N/A self _listener bind N/A N/A str N/A server_addr N/A 0 0 N/A N/A N/A N/A super __init__ N/A _on_close N/A N/A self N/A N/A N/A 
        Called at the end of a session.

        This method sets number of retransmissions and calls the stats callback
        at the end of the session.
         N/A N/A N/A self _stats retransmits N/A self _retransmits N/A N/A N/A self _stats_callback N/A self _stats N/A _close N/A N/A self test N/A False N/A N/A 
        Wrapper around `_on_close`. Its duty is to perform the necessary
        cleanup. Closing `ResponseData` object, closing UDP sockets, and
        gracefully exiting the process with exit code of 0.
         N/A N/A N/A N/A N/A N/A N/A self _on_close N/A N/A N/A Exception N/A e N/A N/A N/A N/A logging exception N/A Exception raised when calling _on_close: %s e N/A N/A N/A N/A logging debug Closing response data object N/A N/A self _response_data N/A N/A N/A N/A N/A self _response_data close N/A N/A N/A logging debug Closing socket N/A N/A N/A N/A self _listener close N/A N/A N/A logging debug Dying. N/A N/A test False N/A N/A N/A N/A sys exit 0 N/A _parse_options N/A N/A self N/A N/A N/A 
        Method that deals with parsing/validation options provided by the
        client.
         N/A opts_to_ack N/A N/A N/A N/A self _options N/A retries N/A N/A N/A self _options N/A default_timeout N/A N/A N/A logging info N/A N/A Options requested from peer {}:  {} format N/A self _peer N/A self _options N/A N/A N/A self _stats options_in N/A self _options N/A N/A N/A mode N/A self _options N/A N/A N/A self _options N/A mode netascii N/A N/A N/A self _response_data N/A NetasciiReader N/A self _response_data N/A N/A N/A N/A mode N/A self _options N/A N/A N/A self _options N/A mode octet N/A N/A N/A N/A self _stats error N/A error_code error_message N/A constants ERR_ILLEGAL_OPERATION N/A Unknown mode: %r N/A N/A self _options N/A mode N/A N/A N/A self _transmit_error N/A N/A N/A self _close N/A N/A N/A blksize N/A self _options N/A N/A N/A opts_to_ack N/A blksize N/A N/A self _options N/A blksize N/A N/A self _block_size N/A int N/A N/A self _options N/A blksize N/A N/A tsize N/A self _options N/A N/A N/A self _tsize N/A N/A N/A self _response_data size N/A N/A N/A self _tsize None N/A N/A N/A opts_to_ack N/A tsize N/A str N/A self _tsize N/A N/A timeout N/A self _options N/A N/A N/A opts_to_ack N/A timeout N/A N/A self _options N/A timeout N/A N/A self _timeout N/A int N/A opts_to_ack N/A timeout N/A N/A self _options opts_to_ack N/A N/A N/A logging info N/A N/A Options to ack for peer {}:  {} format N/A self _peer N/A self _options N/A N/A N/A self _stats blksize N/A self _block_size N/A N/A N/A self _stats options N/A self _options N/A N/A N/A self _stats options_acked N/A self _options N/A run N/A N/A self N/A N/A N/A This is the main serving loop. N/A N/A N/A self _stats error N/A N/A N/A N/A self _transmit_error N/A N/A N/A self _close N/A N/A N/A N/A self _parse_options N/A N/A self _options N/A N/A N/A N/A self _transmit_oack N/A N/A N/A N/A self _next_block N/A N/A N/A self _transmit_data N/A N/A N/A self _should_stop N/A N/A N/A N/A N/A N/A self run_once N/A N/A N/A N/A KeyboardInterrupt SystemExit N/A N/A N/A N/A logging info Caught KeyboardInterrupt/SystemExit exception. Will exit. N/A N/A N/A N/A self _close N/A run_once N/A N/A self N/A N/A N/A The main body of the server loop. N/A N/A N/A self on_new_data N/A N/A N/A N/A time time N/A self _expire_ts N/A N/A N/A N/A self _handle_timeout N/A _reset_timeout N/A N/A self N/A N/A N/A 
        This method resets the connection timeout in order to extend its
        lifetime..
        It does so setting the timestamp in the future.
         N/A N/A self _expire_ts N/A N/A N/A time time N/A self _timeout N/A on_new_data N/A N/A self N/A N/A N/A 
        Called when new data is available on the socket.

        This method will extract acknowledged block numbers and handle
        possible errors.
         N/A N/A N/A N/A N/A N/A self _listener settimeout N/A self _timeout N/A N/A data peer N/A N/A N/A self _listener recvfrom N/A constants DEFAULT_BLKSIZE N/A N/A N/A N/A self _listener settimeout None N/A N/A N/A N/A socket timeout N/A N/A N/A N/A self _stats error N/A error_code error_message N/A constants ERR_UNDEFINED timeout occurred on socket.recvfrom() N/A N/A self _should_stop True N/A N/A N/A peer N/A self _peer N/A N/A N/A N/A logging error N/A Unexpected peer: %s, expected %s N/A peer N/A self _peer N/A N/A self _should_stop True N/A N/A N/A code block_number N/A N/A struct unpack !HH N/A data N/A 4 N/A N/A code N/A constants OPCODE_ERROR N/A N/A N/A N/A self _stats error N/A error_code error_message block_number N/A N/A N/A data N/A 4 -1 decode ascii ignore N/A N/A N/A logging error N/A Error reported from client: %s N/A N/A N/A self _stats error N/A error_message N/A N/A N/A self _transmit_error N/A N/A self _should_stop True N/A N/A N/A code N/A constants OPCODE_ACK N/A N/A N/A N/A logging error N/A Expected an ACK opcode from %s, got: %d N/A N/A self _peer code N/A N/A N/A self _stats error N/A error_code error_message N/A constants ERR_ILLEGAL_OPERATION I only do reads, really N/A N/A N/A self _transmit_error N/A N/A self _should_stop True N/A N/A N/A N/A self _handle_ack block_number N/A _handle_ack N/A N/A self block_number N/A N/A N/A Deals with a client ACK packet. N/A N/A block_number N/A self _last_block_sent N/A N/A N/A N/A logging error Unexpected ACK, let's handle this as a timeout, and resend the current block N/A N/A N/A self _handle_timeout N/A N/A N/A N/A self _reset_timeout N/A N/A self _retransmits 0 N/A N/A N/A self _stats packets_acked 1 N/A N/A N/A self _next_block N/A N/A N/A self _transmit_data N/A _handle_timeout N/A N/A self N/A N/A N/A N/A N/A self _stats error N/A N/A N/A N/A self _retries N/A self _retransmits N/A N/A N/A N/A self _transmit_data N/A N/A self _retransmits 1 N/A N/A N/A N/A self _stats error N/A error_code error_message N/A constants ERR_UNDEFINED N/A timeout after %d retransmits N/A self _retransmits N/A N/A self _should_stop True N/A N/A N/A logging error N/A N/A N/A self _stats error N/A error_message N/A _next_block N/A N/A self N/A N/A N/A 
        Reads the next block from `ResponseData`. If there are problems
        reading from it, an error will be reported to the client"
         N/A N/A self _last_block_sent 1 N/A N/A N/A self _last_block_sent N/A constants MAX_BLOCK_NUMBER N/A N/A N/A self _last_block_sent 0 N/A N/A N/A last_size 0 N/A N/A self _current_block N/A N/A N/A self _response_data read N/A self _block_size N/A N/A N/A N/A len N/A self _current_block N/A self _block_size N/A N/A len N/A self _current_block last_size N/A N/A last_size N/A len N/A self _current_block N/A N/A self _current_block N/A N/A N/A self _response_data read N/A N/A self _block_size last_size N/A N/A N/A Exception N/A e N/A N/A N/A N/A logging exception N/A Error while reading from source: %s e N/A N/A N/A self _stats error N/A error_code error_message N/A constants ERR_UNDEFINED Error while reading from source N/A N/A N/A self _transmit_error N/A N/A self _should_stop True N/A _transmit_data N/A N/A self N/A N/A N/A Method that deals with sending a block to the wire. N/A N/A N/A self _current_block None N/A N/A N/A self _should_stop True N/A N/A fmt N/A !HH%ds N/A len N/A self _current_block N/A packet N/A N/A struct pack fmt N/A constants OPCODE_DATA N/A self _last_block_sent N/A self _current_block N/A N/A N/A N/A self _listener sendto packet N/A self _peer N/A N/A N/A self _stats packets_sent 1 N/A N/A N/A self _stats bytes_sent N/A len N/A self _current_block N/A N/A N/A len N/A self _current_block N/A self _block_size N/A N/A N/A self _should_stop True N/A _transmit_oack N/A N/A self N/A N/A N/A Method that deals with sending OACK datagrams on the wire. N/A opts N/A N/A N/A key val N/A N/A N/A self _options items N/A N/A fmt N/A str N/A %dsx%ds N/A N/A len key N/A len val N/A N/A N/A opts append N/A N/A struct pack fmt N/A bytes N/A N/A key encode latin-1 N/A bytes N/A N/A val encode latin-1 N/A N/A N/A opts append N/A fmt N/A str !H N/A packet N/A N/A N/A struct pack fmt N/A constants OPCODE_OACK N/A N/A join opts N/A N/A N/A N/A self _listener sendto packet N/A self _peer N/A N/A N/A self _stats packets_sent 1 N/A _transmit_error N/A N/A self N/A N/A N/A Transmits an error to the client and terminates the exchange. N/A fmt N/A str N/A !HH%dsx N/A len N/A N/A N/A N/A N/A self _stats error N/A error_message encode latin-1 N/A packet N/A N/A struct pack fmt N/A constants OPCODE_ERROR N/A N/A N/A self _stats error N/A error_code N/A bytes N/A N/A N/A N/A N/A self _stats error N/A error_message encode latin-1 N/A N/A N/A N/A self _listener sendto packet N/A self _peer N/A get_response_data N/A N/A self N/A N/A N/A 
        This method has to be overridden and must return an object of type
        `ResponseData`.
         N/A N/A NotImplementedError N/A N/A