[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [libmicrohttpd] [GSoC Update] Week 2

From: Didik Setiawan
Subject: Re: [libmicrohttpd] [GSoC Update] Week 2
Date: Sat, 17 Jun 2017 13:53:06 +0700
User-agent: Mutt/1.8+12 (77032036c642) (2017-02-23)

On Tue, Jun 13, 2017 at 06:37:27PM +0200, Darshit Shah wrote:
> >   - http_server_port still hardcoded.
> This is important. The port should be a random number. Usually, passing 0 in
> the port number makes the kernel choose an open one for you.
> Having a randomised port is important to ensure that multiple runs don't
> step on each other.

I still don't know how to accomplish this. Maybe, it just my understanding that
when I pass 0 in MHD port number, the result is still 0.
Another approach, when I look into the old code, it generate port number by
calling wget_tcp_get_local_port(). But, I need to call wget_tcp_init() and
wget_tcp_listen() respectively in order to get proper result.
Conclusion, do I need to use existing wget_tcp_get_local_port() to get the port,
or maybe there is a function in MHD to do that?

Thank you.

Didik Setiawan

reply via email to

[Prev in Thread] Current Thread [Next in Thread]