webby icon indicating copy to clipboard operation
webby copied to clipboard

autodetect bind_addr

Open macton opened this issue 12 years ago • 1 comments

If config.bind_addr is not supplied, detect public ip address and use as default value. Update demo.c to not supply bind_addr (so that, by default, demo is public facing and not on-host only.)

macton avatar Feb 18 '13 05:02 macton

While a nice feature, it's not necessary to do core webby chores. I'd like to keep it around, but put it in an optional webby_aux.c files with an associated webby_aux.h, similar to how Lua structures it's "extra" stuff that is optional.

To complete the demo application, have it use webby_aux.h to set the bind address. It would also be cool if it accepted a bind address and port from the command line, and only called the auto-detect if you didn't give it an IP.

Also a minor thing, but try to keep the patch consistent with the coding style in the rest of the project (indentation, spaces around operators).

Thanks!

deplinenoise avatar Feb 19 '13 18:02 deplinenoise