Go to the latest version of this document.

# ``twisted`.`application`.`strports``

module documentation
(source)

Construct listening port services from a simple string description.

See Also
`twisted.internet.endpoints.serverFromString`
`twisted.internet.endpoints.clientFromString`

Function | `listen` | Listen on a port corresponding to a description.
Function | `service` | Return the service corresponding to a description.
Function | `_getReactor` | Undocumented

def listen(description: `str`, factory: `interfaces.IProtocolFactory`) -> `interfaces.IListeningPort`: (source)

Listen on a port corresponding to a description.

Parameters
description:`str` | The description of the connecting port, in the syntax described by `twisted.internet.endpoints.serverFromString`.
factory:`twisted.internet.interfaces.IProtocolFactory` | The protocol factory which will build protocols on connection.

Returns
`twisted.internet.interfaces.IListeningPort` | the port corresponding to a description of a reliable virtual circuit server.

See Also
`twisted.internet.endpoints.serverFromString`

def service(description: `str`, factory: `interfaces.IProtocolFactory`, reactor: `interfaces.IReactorCore | None` = None) -> `StreamServerEndpointService`: (source)

Return the service corresponding to a description.

Parameters
description:`str` | The description of the listening port, in the syntax described by `twisted.internet.endpoints.serverFromString`.
factory:`twisted.internet.interfaces.IProtocolFactory` | The protocol factory which will build protocols for connections to this service.
reactor:`interfaces.IReactorCore | None` | Undocumented

Returns
`twisted.application.service.IService` | the service corresponding to a description of a reliable stream server.

See Also
`twisted.internet.endpoints.serverFromString`

def _getReactor() -> `interfaces.IReactorCore`: (source)

Undocumented