Updated network package to latest spec

Fixes #1273 and adds in a lot of new APIs.