Use ToSocketAddr to allow the string form of a network address

Using the `ToSocketAddr` trait, we can eliminate the need to import `Ipv4Addr` every time.
It seems that if I do `addr.to_socket_addr()` outside of the `proc()`, and then pass it to `proc()`, it works. Should I proceed like this?