Skip to content

Something about function mg_connect #2435

Discussion options

You must be logged in to vote

Please follow the guidelines in the documentation, examples and tutorials available.
There is already an example on how to do what you want to do: https://mongoose.ws/documentation/tutorials/tcp/
Yours is a networking concepts problem. localhost means "resolve this address and use it", that is usually the loopback address; 0.0.0.0 means "this host in this network" and in a listener context means "listen in all interfaces". You can't, of course, try to connect to that address because there is no way to resolve that,

Replies: 2 comments

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Answer selected by scaprile
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants