[Twisted-Python] Freevo 2.0, Kamaelia, pyevent, Eventnet/LGT: what's going on?
Grant Baillie
grant at osafoundation.org
Thu Oct 20 19:03:05 MDT 2005
On Oct 20, 2005, at 16:54, Andrew Bennetts wrote:
>>
>> There is a terminology problem, since I don't understand why
>> something
>> named "Protocol" should be destroyed at every connection. Or it
>> should
>> be, quite logically, renamed "Connection". Also this doesn't
>> appear in
>> the API docs (again).
>>
>
> ...
>
> As to why it's "Protocol" rather than "Connection"... that would be
> differently confusing :)
>
> The "connection" to me sounds like what the transport already is --
> the
> thing responsible for taking bytes (or datagrams) from here and
> sending them
> to there, and that you can disconnect, and so on. In Twisted, the
> "Protocol" is the thing responsible for interpreting events from the
> underlying connection (and in most cases, doesn't care if the
> underlying
> transport is TCP, SSL, UNIX domain sockets, or whatever -- how the
> bytes are
> transported isn't its responsibility).
Speaking as someone who's done a bunch of network programming in a
different environment (OS/X + Cocoa), I'm gonna pipe up @ this point
and say one of the things I really liked as a complete newbie to
Twisted was the Factory/Protocol/Transport separation (including the
names of the classes). Maybe that's because I started with the Finger
examples, which made things pretty clear IMHO.
--Grant
Grant Baillie
Open Source Applications Foundation
http://www.osafoundation.org
More information about the Twisted-Python
mailing list