[network] Fix additional int/long confusion.

This makes further corrections for using 32 bit values on 64 bit
targets in the network library.