babelouest / ulfius

Web Framework to build REST APIs, Webservices or any HTTP endpoint in C language. Can stream large amount of data, integrate JSON data with Jansson, and create websocket services
https://babelouest.github.io/ulfius
GNU Lesser General Public License v2.1
1.07k stars 183 forks source link

[Issue]-Specify the Listen IP address with port number #173

Closed mmanoj closed 3 years ago

mmanoj commented 3 years ago

Describe the issue How Can I specify the listen to IP address with the port?

babelouest commented 3 years ago

Hello @mmanoj ,

You need to specify a struct sockaddr_in * bind_address or struct sockaddr_in6 * bind_address in the functions ulfius_init_instance or ulfius_init_instance_ipv6.

Check out the Webservice initialization documentation for more details and your system documentation for the structures struct sockaddr_in * bind_address or struct sockaddr_in6 * bind_address.

mmanoj commented 3 years ago

@babelouest Thanks for the quick feedback, Will check and update the progress.