4 ms·
I don't understand the reason for two `tcp_connect` functions. One just adds the option to pass "w" to the fd mode. Both functions are otherwise identical. Desp
by suprjami 11y ago
I don't understand the reason for two `tcp_connect` functions. One just adds the option to pass "w" to the fd mode. Both functions are otherwise identical. Despite the "IPv4 only" comment, both structure pack with `getnameinfo()` so both appear IPv6-capable. Looks like this could be optimised to remove the first connect function.
- suprjami 11y agoftp_getdataport() should return a char with sprintf, not an int. The port member of ftp_t could then be the same as the port member of skod_t, negating the need for two different tcp_connect functions.