Class: NetstringReceiver | Twisted-0.19.0/twisted/protocols/basic.py | |||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
This uses djb's Netstrings protocol to break up the input into strings.Each string makes a callback to stringReceived, with a single argument of that string. Security features: 1) Messages are limited in size, useful if you don't want someone sending you a 500MB netstring (change MAX_LENGTH to the maximum length you wish to accept). 2) The connection is lost if an illegal message is received.
|