CapsAdmin / luajitsocket

pure luajit ffi socket bindings for unix and windows
MIT License
36 stars 5 forks source link

Incorrect representation of ip and port by addrinfo member functions #6

Closed vwout closed 1 year ago

vwout commented 1 year ago

The addrinfo struct member functions addrinfo_get_ip and addrinfo_get_port do not return the correct string representation of ip and port (on Windows 10). When a socket connection is established, this information can be retrieved via the get_name() and get_peer_name() members. For listening sockets, or address structs that are not used in a socket, the addrinfo struct needs to be used.

The data returned is incorrect because:

CapsAdmin commented 1 year ago

Good catch.

I also gave you access to the repo if you wanna change and fix stuff.