wokkel
wokkel copied to clipboard
Add support for twisted bindAddress argument
Hello,
when using servers with multiple interfaces, we need to be able to choose which interface to use for binding the socket for the outgoing connection.
Twisted use an internal argument called bindAddress for this purpose, this pull request add support for this in the XMPP client.
Best Regards.
@sayoun: Thanks for the patch! It would be great if you could add some unittests for the these changes, as well as a docstring for the new parameter to XMPPClient
.
Hello,
I added a docstring and a unittest for the new parameter bindAddress. Unittest has a comment explaining why we must use a callLater in order to have the unittest work, because we need to keep the reactor clean between tests otherwise it fails.
Best Regards.
Thanks for you feedback,
I rewrote the tests according to your message, I hope this time it covers everything.