[Socket] Fix listening on IPv6 addresses

This simple patch adds support for listening on IPv6 addresses. IPv6 addresses need to be enclosed in square brackets if a port is appended.