Table of Contents

Class: Client | Twisted-0.17.4/twisted/internet/tcp.py
--- | ---

A client for TCP (and similiar) sockets.

Base Classes |
--- | ---

Connection

abstract.FileDescriptor
protocol.Transport
styles.Ephemeral

Methods |
--- | ---

__init__ __repr__ _setRealAddress connectionLost createInternetSocket | doConnect failIfNotConnected getHost getPeer resolveAddress

| __init__

    __init__ (
            self,
            host,
            port,
            protocol,
            timeout=None,
            connector=None,
            )

Initialize the client, setting up its socket, and request to connect.

| __repr__

    __repr__ ( self )

| _setRealAddress

    _setRealAddress ( self,  address )

| connectionLost

    connectionLost ( self )

| createInternetSocket

    createInternetSocket ( self )

(internal) Create an AF_INET socket.

| doConnect

    doConnect ( self )

### I connect the socket.

Then, call the protocol's makeConnection, and start waiting for data.

| failIfNotConnected

    failIfNotConnected ( self,  *ignored )

| getHost

    getHost ( self )

### Returns a tuple of (`INET`, hostname, port).

This indicates the address from which I am connecting.

| getPeer

    getPeer ( self )

### Returns a tuple of (`INET`, hostname, port).

This indicates the address that I am connected to. I implement twisted.protocols.protocol.Transport.

| resolveAddress

    resolveAddress ( self )

Table of Contents

This document was automatically generated on Sat Apr 20 01:30:49 2002 by HappyDoc version 2.0