interface documentation

Undocumented

Method do Indicate a desire for the peer to begin performing the given option.
Method dont Indicate a desire for the peer to cease performing the given option.
Method requestNegotiation Send a subnegotiation request.
Method will Indicate our willingness to begin performing this option locally.
Method wont Indicate that we will stop performing the given option.

Inherited from ITransport:

Method getHost Similar to getPeer, but returns an address describing this side of the connection.
Method getPeer Get the remote address of this connection.
Method loseConnection Close my connection, after writing all pending data.
Method write Write some data to the physical connection, in sequence, in a non-blocking fashion.
Method writeSequence Write an iterable of byte strings to the physical connection.
def do(option): (source)

Indicate a desire for the peer to begin performing the given option.

Returns a Deferred that fires with True when the peer begins performing the option, or fails with OptionRefused when the peer refuses to perform it. If the peer is already performing the given option, the Deferred will fail with AlreadyEnabled. If a negotiation regarding this option is already in progress, the Deferred will fail with AlreadyNegotiating.

Note: It is currently possible that this Deferred will never fire, if the peer never responds, or if the peer believes the option to already be enabled.

def dont(option): (source)

Indicate a desire for the peer to cease performing the given option.

Returns a Deferred that fires with True when the peer ceases performing the option. If the peer is not performing the given option, the Deferred will fail with AlreadyDisabled. If negotiation regarding this option is already in progress, the Deferred will fail with AlreadyNegotiating.

Note: It is currently possible that this Deferred will never fire, if the peer never responds, or if the peer believes the option to already be disabled.

def requestNegotiation(about, data): (source)

Send a subnegotiation request.

Parameters
aboutA byte indicating the feature being negotiated.
dataAny number of bytes containing specific information about the negotiation being requested. No values in this string need to be escaped, as this function will escape any value which requires it.
def will(option): (source)

Indicate our willingness to begin performing this option locally.

Returns a Deferred that fires with True when the peer agrees to allow us to begin performing this option, or fails with OptionRefused if the peer refuses to allow us to begin performing it. If the option is already enabled locally, the Deferred will fail with AlreadyEnabled. If negotiation regarding this option is already in progress, the Deferred will fail with AlreadyNegotiating.

Note: It is currently possible that this Deferred will never fire, if the peer never responds, or if the peer believes the option to already be enabled.

def wont(option): (source)

Indicate that we will stop performing the given option.

Returns a Deferred that fires with True when the peer acknowledges we have stopped performing this option. If the option is already disabled locally, the Deferred will fail with AlreadyDisabled. If negotiation regarding this option is already in progress, the Deferred will fail with AlreadyNegotiating.

Note: It is currently possible that this Deferred will never fire, if the peer never responds, or if the peer believes the option to already be disabled.