# ``twisted`.`internet`.`base`.`BaseConnector``

class documentation

`class BaseConnector(ABC): (source)`

Known subclasses: `twisted.internet.tcp.Connector`, `twisted.internet.unix.Connector`

Implements interfaces: `twisted.internet.interfaces.IConnector`

View In Hierarchy

Basic implementation of `IConnector`.

State can be: "connecting", "connected", "disconnected"

Method | `__init__` | Undocumented
Method | `__repr__` | Undocumented
Method | `buildProtocol` | Undocumented
Method | `cancelTimeout` | Undocumented
Method | `connect` | Start connection to remote server.
Method | `connectionFailed` | Undocumented
Method | `connectionLost` | Undocumented
Method | `disconnect` | Disconnect whatever our state is.
Method | `getDestination` | Return destination this will try to connect to.
Method | `stopConnecting` | Stop attempting to connect.
Instance Variable | `factory` | Undocumented
Instance Variable | `factoryStarted` | Undocumented
Instance Variable | `reactor` | Undocumented
Instance Variable | `state` | Undocumented
Instance Variable | `timeout` | Undocumented
Instance Variable | `timeoutID` | Undocumented
Instance Variable | `transport` | Undocumented
Method | `_makeTransport` | Undocumented

def __init__(self, factory, timeout, reactor): (source)
overridden in `twisted.internet.tcp.Connector`, `twisted.internet.unix.Connector`

Undocumented

Parameters
factory:`ClientFactory` | Undocumented
timeout:`float` | Undocumented
reactor:`ReactorBase` | Undocumented

def __repr__(self): (source)

Undocumented

Returns
`str` | Undocumented

def buildProtocol(self, addr): (source)

Undocumented

Parameters
addr:`IAddress` | Undocumented
Returns
`Optional[IProtocol]` | Undocumented

def cancelTimeout(self): (source)

Undocumented

def connect(self): (source)
from `twisted.internet.interfaces.IConnector`
Start connection to remote server.
def connectionFailed(self, reason): (source)

Undocumented

Parameters
reason:`Failure` | Undocumented

def connectionLost(self, reason): (source)

Undocumented

Parameters
reason:`Failure` | Undocumented

def disconnect(self): (source)
from `twisted.internet.interfaces.IConnector`
Disconnect whatever our state is.
def getDestination(self): (source)
from `twisted.internet.interfaces.IConnector`
overridden in `twisted.internet.tcp.Connector`, `twisted.internet.unix.Connector`
Return destination this will try to connect to.

Returns
`IAddress` | An object which provides `IAddress`.

def stopConnecting(self): (source)
from `twisted.internet.interfaces.IConnector`
Stop attempting to connect.
factory = (source)

Undocumented

factoryStarted: `int` = (source)

Undocumented

reactor = (source)

Undocumented

state: `str` = (source)

Undocumented

timeout = (source)

Undocumented

timeoutID = (source)

Undocumented

transport = (source)

Undocumented

@abstractmethod
def _makeTransport(self): (source)
overridden in `twisted.internet.tcp.Connector`, `twisted.internet.unix.Connector`

Undocumented

Returns
`Client` | Undocumented