Add port and socket arguments

Hi Patrick,

I've found your library very useful for some simple migrations during our deployment process.
We required port and socket configuration so we're working from a fork, but you can merge the changes too if you like.

Keep up the good work!
Andrew.