Table of Contents

Class: Connection | Twisted-0.17.4/twisted/internet/udp.py
--- | ---

### This is a UDP virtual connection

This transport connects to a given host/port over UDP. By nature of UDP, only outgoing communications are allowed. If a connection is initiated by a packet arriving at a UDP port, it is up to the port to call dataReceived with that packet. By default, once data is written once to the connection, it is lost.

Base Classes |
--- | ---
abstract.FileDescriptor protocol.Transport styles.Ephemeral

Methods |
--- | ---
__init__ connectionLost getHost getPeer logPrefix setRealAddress write writeSomeData
| __init__

    __init__ (
            self,
            skt,
            protocol,
            remote,
            local,
            sessionno,
            )

| connectionLost

    connectionLost ( self )

See abstract.FileDescriptor.connectionLost().

| getHost

    getHost ( self )

Returns a tuple of (`INET_UDP`, hostname, port), indicating the servers address

| getPeer

    getPeer ( self )

Returns a tuple of (`INET_UDP`, hostname, port), indicating the connected client's address

| logPrefix

    logPrefix ( self )

Return the prefix to log with when I own the logging thread.

| setRealAddress

    setRealAddress ( self,  address )

| write

    write ( self,  data )

| writeSomeData

    writeSomeData ( self,  data )

Connection.writeSomeData(data) -> #of bytes written | CONNECTION_LOST This writes as much data as possible to the socket and returns either the number of bytes read (which is positive) or a connection error code (which is negative)

Table of Contents

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