Quantcast
Channel: Forum - Recent Threads
Viewing all articles
Browse latest Browse all 5781

nx_tcp_client_socket_connect returning NX_INVALID_INTERFACE (0x4C)

$
0
0

Good afternoon,

I am trying to connect as a socket client to a server. It really seems quite straightforward, but I am founding that every call to nx_tcp_client_socket_connect ends with error (NX_INVALID_INTERFACE).

Here is the relevant code. The NX_IP is started and it's working (i've tested since it also has a webserver). I've tested with the webserver on and off, and tcp and fragmentation are enabled.

status = nx_tcp_socket_create(&ws_ip,&socket,"socket2cloud",NX_IP_NORMAL,NX_DONT_FRAGMENT,NX_IP_TIME_TO_LIVE,
100,NX_NULL,NX_NULL);
...

status = nx_tcp_client_socket_bind(&socket,NX_ANY_PORT,NX_WAIT_FOREVER);
..

status = nx_tcp_client_socket_connect(&socket,IP_ADDRESS(192,168,1,156),12,300);
if (status != NX_SUCCESS)
{
  while(1); // here it hangs, returning NX_INVALID_INTERFACE
}

Any help will be more than welcome!

BR


Viewing all articles
Browse latest Browse all 5781

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>