× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



The bind() API can be used to force a TCP socket to use a particular IP address, as Michael already explained. Set the port to 0 to let the OS choose the port.

However, this doesn't make sense to do. IF your TCP/IP routes are configured properly, it will automatically pick the correct IP address. If the routes aren't configured properly, binding to a particular address won't help you, because the packets still need to be routed correctly for the connection to work.

So this doesn't make a lot of sense to me.

Binding to a particular IP address is a tool usually used on a listening server program so that you can (for example) listen on your internal subnet without allowing access from the public internet. Stuff like that. It doesn't make sense to use in a client program -- at least not in my experience.

I wonder if you don't have a misconfigured route somewhere?



Joe Wells wrote:
Our 400 has two IP addresses.

Using Scott Klement's socket utilities service program, I have created
working client and server programs.

Here is my dilemma - our network folks established a secure connection
(tunnel?) between us and another system. The problem is that the one of my
socket programs is now using the "other" ip address on our 400. Consequently, this program cannot connect!

So, my question is - Is there a way to specify the outbound IP address the
socket uses?

Thanks,

Joe

Joe Wells
University of Alabama Health Services Foundation
500 22nd Street South, Suite 308
Birmingham, AL 35233
205-731-5610

CONFIDENTIALITY NOTICE
This e-mail is intended for the sole use of the individual(s) to whom it is
addressed, and may contain information that is privileged, confidential and
exempt from disclosure under applicable law. You are hereby notified that
any dissemination, duplication or distribution of this transmission by
someone other than the intended addressee or its designated agent is
strictly prohibited. If you receive this e-mail in error, please notify me
immediately by replying to this e-mail.



As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:
Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.