Go to the latest version of this document.

# ``twisted`.`internet`.`_resolver`.`FirstOneWins``

class documentation

`class FirstOneWins: (source)`

Constructor: `FirstOneWins(deferred)`

Implements interfaces: `twisted.internet.interfaces.IResolutionReceiver`

View In Hierarchy

An `IResolutionReceiver` which fires a `Deferred` with its first result.

Method | `__init__` | No summary
Method | `addressResolved` | See `IResolutionReceiver.addressResolved`
Method | `resolutionBegan` | See `IResolutionReceiver.resolutionBegan`
Method | `resolutionComplete` | See `IResolutionReceiver.resolutionComplete`
Instance Variable | `_deferred` | Undocumented
Instance Variable | `_resolution` | Undocumented
Instance Variable | `_resolved` | Undocumented

def __init__(self, deferred: `Deferred[str]`): (source)

Parameters
deferred:`Deferred[str]` | The `Deferred` to fire when the first resolution result arrives.

def addressResolved(self, address: `IAddress`): (source)
from `twisted.internet.interfaces.IResolutionReceiver`

See `IResolutionReceiver.addressResolved`

Parameters
address:`IAddress` | See `IResolutionReceiver.addressResolved`

def resolutionBegan(self, resolution: `IHostResolution`): (source)
from `twisted.internet.interfaces.IResolutionReceiver`

See `IResolutionReceiver.resolutionBegan`

Parameters
resolution:`IHostResolution` | See `IResolutionReceiver.resolutionBegan`

def resolutionComplete(self): (source)
from `twisted.internet.interfaces.IResolutionReceiver`

See `IResolutionReceiver.resolutionComplete`

_deferred = (source)

Undocumented

_resolution = (source)

Undocumented

_resolved: `bool` = (source)

Undocumented