Initial implementation of network API.