I'd like to develop a server that maintains a TCP connection to an
upstream server, and listens for HTTP requests. Upon receiving an HTTP
request, the server will send a message upstream, wait for a response,
and return an HTTP response to the client which made the request.
My background is in wri
rten ter Huurne wrote:
> > On Saturday, 8 February 2020 01:50:04 CET Go Luhng wrote:
> > > I am creating a child class
> > > `Child(twisted.internet.protocol.DatagramProtocol)` to implement a
> > > custom UDP multicast protocol.
> > >
> > > I nee
I am creating a child class
`Child(twisted.internet.protocol.DatagramProtocol)` to implement a
custom UDP multicast protocol.
I need to add an `__init__()` to `Child`, but as part of that I need
to call `super()` which is impossible because `DatagramProtocol` is
old-style.
How should I proceed?
Thanks for the detailed responses, Colin and Barry. I have a followup
question about sans-io. From the document:
> For input (that is, receiving data from the network), the
calling code is responsible for delivering code to the
implementation via a single input (often via a method called
receive_b
Thanks Colin and Barry for the reply. I read the sans-io docs and it
is an attractive approach.
I believe I have a plan going forward, but I'm not sure what you mean
by explicit vs implicit state machine, if you care to elaborate.
___
Twisted-Python mai
> Colin Dunklau wrote:
>
> Assuming the header has a fixed length,
It does. The header is just a serialized C struct, so it's
fully-specified for length and offset of each field.
> OTOH, that's for stream protocols, so if you want to eventually handle
> UDP, it's probably nicer to do the full san
Hi there,
I'm planning to use Twisted to write a client for the following protocol:
Each messages is composed of two separate messages:
1. A header, which is a serialized C struct, containing multiple
fields, among them a `length` field.
2. A Protocol Buffer payload, which length is specified by