Seems reasonable to me. I assume it uses localhost if no host is specified? I think it would be better to make that explicit.