Programming socket-independent network functions with nethuns