twisted.internet.tcp.BaseClient(_BaseBaseClient, _TLSClientMixin, Connection)
class documentationtwisted.internet.tcp
View Source
(View In Hierarchy)
Known subclasses: twisted.internet.tcp.Client, twisted.internet.unix.Client
A base class for client TCP (and similiar) sockets.
Instance Variable | realAddress | The address object that will be used for socket.connect; this address is an
address tuple (the number of elements dependent upon the address family)
which does not contain any names which need to be resolved. (type: tuple ) |
Method | createInternetSocket | (internal) Create a non-blocking socket using self.addressFamily, self.socketType. |
Method | doConnect | Initiate the outgoing connection attempt. |
Instance Variable | _base | Connection ,
which is the base class of this class which has all of the useful file
descriptor methods. This is used by _TLSServerMixin
to call the right methods to directly manipulate the transport, as is
necessary for writing TLS-encrypted bytes (whereas those methods on Server will go
through another layer of TLS if it has been enabled). |
Method | _stopReadingAndWriting | Implement the POSIX-ish (i.e. twisted.internet.interfaces.IReactorFDSet )
method of detaching this socket from the reactor for _BaseBaseClient . |
Method | _collectSocketDetails | Clean up references to the socket and its file descriptor. |
Method | _connectDone | This is a hook for when a connection attempt has succeeded. |
Inherited from _AbortingMixin (via Connection):
Method | abortConnection | Aborts the connection immediately, dropping any buffered data. |
Instance Variable | _aborting | Set to True when abortConnection is called. (type: bool ) |
Inherited from _AbortingMixin (via Connection):
Method | abortConnection | Aborts the connection immediately, dropping any buffered data. |
Instance Variable | _aborting | Set to True when abortConnection is called. (type: bool ) |
Inherited from _AbortingMixin (via Connection):
Method | abortConnection | Aborts the connection immediately, dropping any buffered data. |
Instance Variable | _aborting | Set to True when abortConnection is called. (type: bool ) |
Inherited from _AbortingMixin (via Connection):
Method | abortConnection | Aborts the connection immediately, dropping any buffered data. |
Instance Variable | _aborting | Set to True when abortConnection is called. (type: bool ) |
Inherited from _AbortingMixin (via Connection):
Method | abortConnection | Aborts the connection immediately, dropping any buffered data. |
Instance Variable | _aborting | Set to True when abortConnection is called. (type: bool ) |
Inherited from _AbortingMixin (via Connection):
Method | abortConnection | Aborts the connection immediately, dropping any buffered data. |
Instance Variable | _aborting | Set to True when abortConnection is called. (type: bool ) |
Inherited from _AbortingMixin (via Connection):
Method | abortConnection | Aborts the connection immediately, dropping any buffered data. |
Instance Variable | _aborting | Set to True when abortConnection is called. (type: bool ) |
tuple
)
Connection
,
which is the base class of this class which has all of the useful file
descriptor methods. This is used by _TLSServerMixin
to call the right methods to directly manipulate the transport, as is
necessary for writing TLS-encrypted bytes (whereas those methods on Server
will go
through another layer of TLS if it has been enabled).
Implement the POSIX-ish (i.e. twisted.internet.interfaces.IReactorFDSet
)
method of detaching this socket from the reactor for _BaseBaseClient
.
Clean up references to the socket and its file descriptor.
See Also | _BaseBaseClient |
(internal) Create a non-blocking socket using self.addressFamily, self.socketType.
Initiate the outgoing connection attempt.
Note | Applications do not need to call this method; it will be invoked internally
as part of IReactorTCP.connectTCP . |
This is a hook for when a connection attempt has succeeded.
Here, we build the protocol from the twisted.internet.protocol.ClientFactory
that was passed in, compute a log string, begin reading so as to send
traffic to the newly built protocol, and finally hook up the protocol
itself.
This hook is overridden by ssl.Client
to
initiate the TLS protocol.