I have a server with two different network interfaces, each with a different IP address. How can I create a socket so it'll go out a specific IP address?
I'd prefer a python example, but the question is language agnostic, so shoot away.
EDIT: Please don't give me "You can't" as an answer. I mean, it is a computer. I can do anything I like to it, for example - I can problematically disable the one interface I don't want on the fly. I'm looking for something prettier.