wiki:ProtocolPEP

Version 2 (modified by exarkun, 5 years ago) (diff)

--

Abstract

Define the protocol and transport interfaces.

Rationale

  • Separation simplifies unit testing
  • Allows re-use of protocols on different transports (different kinds and different providers)
  • Reduces duplication
    • SSL
    • Line handling

Protocol API

makeConnection

dataReceived

connectionLost

Transport API

write

writeSequence

loseConnection

Reference Implementation

Twisted

asyncore

References