It looks like you are passing in a valid Class B address.
The obvious reason would be if the ip address would not be a valid address.
The place where this error code can be returned is from nx_tcp_client_socket_connect() inside the HTTP client: are you able to connect directly to port 80 on the server's IP address?