net: give better error messages

Add address and/or port to errors where applicable for better reporting.

See #7005
Drop the extra newline. We only have 2 newline characters between function declarations.