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

2017-08-16 Thread Cory Benfield
> On 15 Aug 2017, at 01:22, Jarosław Fedewicz > wrote: > > The number of protocols that use TCP or UDP interchangeably is quite high. > Some applications where Twisted would be an appropriate choice, could even > work with non-TCP/UDP transports, like QUIC, DCCP, STCP, etc. Is it? TCP and

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

2017-08-16 Thread Jarosław Fedewicz
This makes a perfect sense. (I ended up implementing it in this sorta way, but the other way around: it was a primarily-datagram protocol that could use TCP as a transport, provided there is appropriate framing.) However, while there is really a need for a shim to make use of polytransport protoco

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

2017-08-16 Thread Tristan Seligmann
On Wed, 16 Aug 2017 at 13:53 Jarosław Fedewicz 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 i

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

2017-08-16 Thread Jean-Paul Calderone
On Wed, Aug 16, 2017 at 7:53 AM, Jarosław Fedewicz < jaroslaw.fedew...@gmail.com> wrote: > This makes a perfect sense. (I ended up implementing it in this sorta way, > but the other way around: it was a primarily-datagram protocol that could > use TCP as a transport, provided there is appropriate

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

2017-08-16 Thread Kevin Conway
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 Fa

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

2017-08-16 Thread Tristan Seligmann
On Wed, 16 Aug 2017 at 15:28 Kevin Conway wrote: > 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 t

[Twisted-Python] SSLContext not valid for TLS Server

2017-08-16 Thread ceeborraa
Hi, I'm running Twisted 17.5.0 on Python 3.5.3 and want to create a TLS server with Twisted. I strictly sticked to the example of echoserv_ssl.py on http://twistedmatrix.com/documents/current/core/howto/ssl.html, but TLS server is not running properly. Despite the server starts correctly, it does

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

2017-08-16 Thread Jean-Paul Calderone
On Wed, Aug 16, 2017 at 9:59 AM, Tristan Seligmann wrote: > On Wed, 16 Aug 2017 at 15:28 Kevin Conway > wrote: > >> 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 t

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

2017-08-16 Thread Kevin Conway
> There is no datagram endpoints API as yet, though (see #4471), only stream endpoints. I'm not sure I understand the distinction. Endpoints supports UDP which is a datagram based transport. From a Protocol perspective, you only care about which bytes are received. If you have a framing concept I'

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

2017-08-16 Thread Kevin Conway
> There is no datagram endpoints API as yet, though (see #4471), only stream endpoints. I've read through the ticket. What I still don't understand is the significance of this of this? Other than some irrelevant callbacks, what prevents anyone from using the existing UDP endpoint? It's not clear f