A portable network abstraction library