emeric636 / mongoose

Automatically exported from code.google.com/p/mongoose
MIT License
0 stars 0 forks source link

Bind to port implemented, but no bind to IP? #47

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
I see that the program has a bind-to-specific-port(s) option on the 
command line and via the config file. I don't see that there's a way to 
bind to a specific IP address. 

I've got a machine I'd like to have a "production quality" HTTP server as 
well as this lighter HTTP server. For reasons I don't want to go into, 
both NEED to be on port 80, I can only vary the IP address, not the port. 

It'd be nice if I could do that by having bind-to-ip functionality in 
mongoose, too.

What version of the product are you using? On what operating system?
  mongoose-2.6 for Windows, via installer (not that it matters)
  Windows XP MCE 2002 SP3

Original issue reported on code.google.com by roza.cho...@gmail.com on 22 May 2009 at 7:10

GoogleCodeExporter commented 9 years ago
Binding to IP is actually implemented. I just have checked wiki documentation 
and
found out that it has not been synced with the latest version, I will do it 
shortly.

Please use "mongoose -ports ip1:port1,ip2:port2,..."
Reopen the bug if it does not work.

Original comment by valenok on 22 May 2009 at 7:16

GoogleCodeExporter commented 9 years ago
I'm guessing this means it's bound by IP only, and not by interface.

In other words, I can either use this feature or DHCP, but not both unless I 
use 
static DHCP assignments to make sure the interface it's bound to keeps on being 
assigned the IP address in the config file...

That's fine, but I just wanted to clarify.

Hmm... I wonder... a utility to rewrite the config file to adjust the IP 
address 
based on the assigned one for a given interface... Nah... too messy... :)

Original comment by roza.cho...@gmail.com on 22 May 2009 at 7:32

GoogleCodeExporter commented 9 years ago
Aha. Using Google Code for the first time, and hadn't noticed it was open 
issues 
only. I see that this was already flagged and discussed in issue #29.

Original comment by roza.cho...@gmail.com on 22 May 2009 at 7:35

GoogleCodeExporter commented 9 years ago
Yeah, you need to have static IP assignment.
For dynamic IP assignment, you would need to patch main.c to periodically 
resolve
your own hostname, and if IP changes, do mg_set_option(... new_ip_address..) .

Original comment by valenok on 22 May 2009 at 8:49