# ``twisted`.`internet`.`interfaces`.`IConnector``

interface documentation

`class IConnector(Interface): (source)`

Known implementations: `twisted.internet.base.BaseConnector`, `twisted.names.srvconnect.SRVConnector`, `twisted.internet.testing._FakeConnector`

View In Hierarchy

Object used to interface between connections and protocols.

Each `IConnector` manages one connection.

Method | `connect` | Try to connect to remote address.
Method | `disconnect` | Disconnect regardless of the connection state.
Method | `getDestination` | Return destination this will try to connect to.
Method | `stopConnecting` | Stop attempting to connect.

def connect(): (source)
Try to connect to remote address.
def disconnect(): (source)

Disconnect regardless of the connection state.

If we are connected, disconnect, if we are trying to connect, stop trying.

def getDestination(): (source)
Return destination this will try to connect to.

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

def stopConnecting(): (source)
Stop attempting to connect.