Hey folks,
assume a computer has multiple IP addresses which it can use to connect to a server. Is there any way I can tell OpenNetworkConnection() to use any specific IP address for establishing that connection (i.e. the ClientIP() which the server will then see)?
I have already found a solution for this problem but that didn't use native code at all; using this solution would involve rewriting large portions of my application and I'd like to avoid that if possible.
Thanks a lot!
merendo
Select client IP for connecting to a server
Select client IP for connecting to a server
The truth is never confined to a single number - especially scientific truth!
Re: Select client IP for connecting to a server
yes TOVARISH you can!
http://www.tomshardware.co.uk/forum/399 ... onnections
and here we go TOVARISH !!!
http://www.r1ch.net/stuff/forcebindip/
combining with your knoledge about networks and purebasic client server programs you got it!
http://www.tomshardware.co.uk/forum/399 ... onnections
and here we go TOVARISH !!!
http://www.r1ch.net/stuff/forcebindip/
combining with your knoledge about networks and purebasic client server programs you got it!
-
- Enthusiast
- Posts: 107
- Joined: Thu May 06, 2010 11:36 pm
Re: Select client IP for connecting to a server
If you just want to have a fast solution for your self, you can hook the connect api in your application. Instead of allowing Purebasic to call connect directly, you bind the socket to the interface and forward the request to the original api call.
I recommend to use this method only for personal use, as hooking could be intrepreted as some kind of virus or trojan (although a virus hooking it self would be ridiculous) and would fail if the command would just change a bit in the next version of the operating system.
DarkPlayer
I recommend to use this method only for personal use, as hooking could be intrepreted as some kind of virus or trojan (although a virus hooking it self would be ridiculous) and would fail if the command would just change a bit in the next version of the operating system.
DarkPlayer
My blog: http://fds-team.de/cms/