Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

A networking IO abstraction library in C - https://github.com/apankrat/tcp-striper

Based around an idea of IO pipes with minimal semantics (duplex, reliable, ordered) that they can then extend to implement other traits like IO buffering, atomic send, packetization, compression, encryption, etc. [1]

This then allows merging together pipes of different types (by attaching the output of one to the input of another), which combines their traits and yields, for example, a reliable datagram carrier with in-flight compression.

With this it also becomes possible to write a simple IO bridge [2] that relays both data _and_ operational state between two pipes. The bridge in turn can be used to implement all sorts of interesting things, e.g. proper TCP relay, SSL tunneling proxy, TCP trunking proxy, etc.

[1] https://github.com/apankrat/tcp-striper/blob/master/src/io/i...

[2] https://github.com/apankrat/tcp-striper/blob/master/src/io/i...



Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: