On Sun, 29 Apr 2001 10:54:17 -0700, Neil Schemenauer <nas at python.ca> wrote: >Daniel Klein wrote: >> What if the server doesn't know in advance how much data will >> be sent from the client? > >You need to build this into your protocol. A lot of existing >protocols use terminators to signal the end of data like "\r\n" >or something similar. I like using Dan Bernstein's netstring >protocol: Thanks Neil, this is exactly what I was proposing to do. Question: Why is the protocol using 'u' instead of 'i' in the format string? "%lu:" % len(s) vs "%li:" % len(s) Thanks for the code, Dan
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4