it might actually be an incorrect understanding of the relationship between the two - it’s not like inheritance is not misused (by me and everyone else) in more object-oriented languages for the sake of simplicity. it usually works out ok. in more worldly terms, the concept holds true though; an http server is a tcp server in the same way that a coffee machine is an electrical machine (drinking my coffee, so first thing that came to mind).
either way, how do you usually go about modeling relationships like these in ReScript? I ended up setting up the http part upon acceptance of the connection, so the state ended up as part of captures for a closure. that is basically the same as creating an object, just using a different syntax.