Refactor network client to use Datagram_ptr