Similarly, use InetPton rather than WSAStringToAddress.
The WSAAddressToString function is intended to provide a user-readable
string and thus includes the port number. This breaks some use cases
on Windows which expect to get just the IP address.
Note: The InetPton and InetNtop functions are available only in Vista or above.
Also add checking for "would block" errors in send() and receive().
Check for set nonblocking failures in TCPConnector as well (generate warnings rather than errors)
The StringRef class does not ensure the string is null terminated. As there is
no defined way to actually check for a null terminator, we determine
if it is null terminated based on the constructor type. Then if on c_str
it is not known to be null terminated, we use a passed in buffer to copy
the string and ensure null termination.
This is a breaking change to dependencies that use the static ntcore
library. Unless the wpiutil library is also linked, linker errors will
result. This does not affect the shared ntcore library.
This will allow dependencies such as wpilibc to update to use wpiutil
without breaking "normal" ntcore static library use in the meantime.
This commit also restructures the gradle files by creating a new
(placeholder) wpiutil project, and moving the ntcore project into
a separate gradle file. Added toolchains/native.gradle (refactored from
ntcore).
Also fixes ntcore skipJava on Windows by providing an alternate .def file
for this case.