nbnet icon indicating copy to clipboard operation
nbnet copied to clipboard

NBN_GameClient_Start does not support domain name

Open wlxmhls opened this issue 3 years ago • 1 comments

Hello, the second parameter of NBN_GameClient_Start can not be domain name: int NBN_GameClient_Start(const char *protocol_name, const char *ip_address, uint16_t port, bool encryption, uint8_t *connection_data)

So if I try to use it like: NBN_GameClient_Start(EXAMPLE_PROTOCOL_NAME, "localhost", SERVER_PORT, false, NULL)

It fails: ERROR: Failed to resolve IP address from localhost

It means only dotted IP address is supported. Could you make it support domain name? Thank you!

wlxmhls avatar Dec 16 '22 12:12 wlxmhls

I'll take a look in the future. Also, it should not be too hard to add support for it, so you can probably implement it yourself and create a PR. I would really appreciate it.

nathhB avatar Dec 24 '22 11:12 nathhB