dedbox
2017-11-27 17:37:56

Point 2 is simple, in the abstract. A ranged listener behaves exactly like a set of simple listeners. Doesn’t Racket’s tcp-listen already support IP ranges?


dedbox
2017-11-27 17:40:44

For Point 3, I think the combinator-style cascade of stream consumers design works well in Racket.


dedbox
2017-11-27 17:49:54

I found my stale axon HTTP code and threw it in a repo. https://github.com/dedbox/old-axon-http


dedbox
2017-11-27 17:50:33

The interesting bits are in the http folder and parse.rkt.


dedbox
2017-11-27 17:51:02

That’s axon/http and axon/parse.rkt


dedbox
2017-11-27 17:56:41

There’s a base http-message struct, specialized by the http-request and http-response sub-structs. The base carries an input port and collects headers as they are parsed.


dedbox
2017-11-27 18:06:25

It’s up to the message consumer to read the body afterwards.


dedbox
2017-11-27 18:08:13

I went a little nuts on parsing syntax. This might be my first attempt to syntax-parse.


dedbox
2017-11-27 18:14:52

This might also be when I decided to embrace exceptions over the monadic style spaghetti you see in there.


dedbox
2017-11-27 18:22:11

Actually, the stop and kill handlers in axon came from this use case. Originally, I wanted to kill sub-parsers without closing the port, and stop top-level parsers when I’m done with the port.


dedbox
2017-11-27 18:26:47

net2 probably won’t need many parsers, so a simpler design might suffice.


dedbox
2017-11-27 18:41:05

Point 4, I still haven’t used disposable. I’ll start adding it to axon to get a feel for it.


dedbox
2017-11-27 18:45:16

and congrats on the legal stuff


notjack
2017-11-28 06:28:03

@dedbox re tcp-listen: yup it does, but only in the limited sense of listening to everything via the broadcast address or listening to both the ip4 and ip6 forms of an address.


notjack
2017-11-28 06:28:58

re cascading stream combinators: mhm, agreed. maybe we’ll just have to try implementing a few protocols and see what exactly we need


notjack
2017-11-28 06:29:50

re http stuff: neat, thanks for putting that up - ill peek at it