Gensio is a framework for giving a consistent view of various stream I/O types. It's used by ser2net to manage network connections.