'@param protocol: This transport will deliver bytes to this protocol.
@type protocol: L{IProtocol} provider
@param isServer: C{True} if this is the accepting side of the
connection, C{False} if it is the connecting side.
@type isServer: L{bool}
@param hostAddress: The value to return from C{getHost}.  L{None}
results in a new L{FakeAddress} being created to use as the value.
@type hostAddress: L{IAddress} provider or L{None}
@param peerAddress: The value to return from C{getPeer}.  L{None}
results in a new L{FakeAddress} being created to use as the value.
@type peerAddress: L{IAddress} provider or L{None}'

def __init__(self, protocol, isServer, hostAddress=None, peerAddress=None):

    self.protocol = protocol
    self.isServer = isServer
    self.stream = []
    self.serial = self._nextserial()
    if (hostAddress is None):
        hostAddress = FakeAddress()
    self.hostAddress = hostAddress
    if (peerAddress is None):
        peerAddress = FakeAddress()
    self.peerAddress = peerAddress
