Getting server IP address

CLIFFORD ILKAY clifford_ilkay at
Wed Apr 15 00:46:09 EDT 2009

Hash: SHA1

Bastiaan Olij wrote:
> Hey Joe,
> I'm very aware of the multiple interface issue, when binding a port
> though, you can bind it on all interfaces meaning any traffic that comes
> in on that port automatically goes to your app (in code, simply listen
> on IP if I recall correctly from doing (win)sock programming in
> C a long long time ago) . Omnis most likely works like this.
> That said, only one, maybe two interfaces will be relevant to my cause.
> Just getting a list of possible ones will help me a long way along though.

If you can bind on all interfaces, doesn't this solve your problem?

> As for changing the bound port. This often is a problem with apps
> reading a text based configuration file at startup. Changing the
> configuration file won't have effect until the app is restarted. Omnis
> on the other hand knows fully well when you change $serverport. It was
> originally so that the binding was still being done on startup but as of
> 4.3 changing $serverport to a value will bind right away if the server
> port was previously unbound. It just doesn't seem to change the binding
> on the fly. I was hoping there was a trick to this because unbinding a
> port and binding to another port is tcp-ip 101.

It is indeed. You can do a "/etc/init.d/foo reload" where "foo" is the
name of a daemon in Linux, such as Apache, Postfix, PostgreSQL, that
supports reloading of the config file. There is no need to do a full
restart in those cases to bind to a different interface or listen on a
different port. It probably works similarly for OS X.
- --

Clifford Ilkay
1419-3266 Yonge St.
Toronto, ON
Canada  M4N 3P6

+1 416-410-3326
Version: GnuPG v1.4.6 (GNU/Linux)
Comment: Using GnuPG with Mozilla -


More information about the omnisdev-en mailing list