v3

Details

A V3FSM steps through the Link Protocol Version 3 connection handshake. At each step, a V3FSM expects to receive a certain type of cell. Either this cell is received, processed, and (optionally) a response cell is returned, or an exception is raised and the associated Connection object is destroyed.

class connection.handshake.v3.V3FSM(transport)[source]

Bases: object

handshakeSupported()[source]

Verify the current connection supports a V3 handshake.

Note

See tor-spec, Section 2 for details.

Returns:bool True if at least one of the conditions necessary for V3 support is True for this connection, False otherwise
recvCell(cell)[source]

Receive and incoming cell and hand off to a processing function based on the current fsm state.

Parameters:cell (cell) – incoming cell to process
Returns:a cell to write to this connection’s transport as a response, or None if no response is required
getInitiatingCell()[source]

Return the initiating cell for this connection handshake.

Returns:oppy.cell.varlen.VersionsCell
isDone()[source]

Return True iff this V3 fsm’s state is V3State.DONE

Returns:bool True is this fsm’s state is V3State.DONE, False otherwise

Previous topic

connection

Next topic

exceptions

This Page