Merge pull request #351 from mikehale/fix-connection-always-closed

Fix connection always closed
add support for a reuse-able local port
add local_address
use same local ip/port, but alternate ip when connecting to server
formatting