[Twisted-Python] Is there a nice way to write transport-agnostic protocols and servers/clients?

Kevin Conway kevinjacobconway at gmail.com
Wed Aug 16 07:27:37 MDT 2017


Maybe I misunderstand the issue, but I believe the Endpoints API solves for
this. https://twistedmatrix.com/documents/16.4.1/core/howto/endpoints.html

This abstracts the transport and allows you to focus on only interpreting
the bytes transmitted over that transport by defining a Protocol and a
Factory that plug into strports. This should allow you to have the business
logic defined in only one location while listening/requesting over
different transports.

On Wed, Aug 16, 2017, 07:15 Tristan Seligmann <mithrandi at mithrandi.net>
wrote:

> On Wed, 16 Aug 2017 at 13:53 Jarosław Fedewicz <
> jaroslaw.fedewicz at gmail.com> wrote:
>
>> One thing that is also notably missing from the puzzle is that there is
>> no support for datagram endpoints.
>>
>
> The lack of datagram endpoint abstractions is definitely just a "we
> haven't gotten around to it yet"; stream endpoints were the initial focus
> mainly because stream protocols are a lot more common than datagram
> protocols. The ticket covering datagram endpoints is here, I believe:
> https://twistedmatrix.com/trac/ticket/4471 There seems to be some old
> work that was never completed, so picking this up again might be a good
> starting point if you're keen on contributing in this area.
> _______________________________________________
> Twisted-Python mailing list
> Twisted-Python at twistedmatrix.com
> https://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-python
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: </pipermail/twisted-python/attachments/20170816/abebdf6d/attachment-0002.html>


More information about the Twisted-Python mailing list