Is there an example of TCP/IP netconn client?
ip4_addr_t remote_ip;
struct netconn *clientConn;
IP4_ADDR(&remote_ip, 192, 168, 0, 11);
clientConn = netconn_new(NETCONN_TCP);
if(clientConn != NULL)
{
conn_err = netconn_connect(clientConn, &remote_ip, 8789);
if(conn_err == ERR_OK)
{
netconn_write(clientConn, message, 22, NETCONN_NOFLAG);
}
}
netconn_close(clientConn);
netconn_delete(clientConn);
osDelay(10);
Ping works, TCP/IP Server also works, but the Client returns ERR_ABRT from the netconnect function.
Since the netconn API Server code worked without any problems, I think there will be no problems with hardware and settings.
So I'm looking for an example to refer to.
I found examples of non-netconn APIs and examples of netconn API Server, but I don't think there are examples of netconn API Clients. (I've seen a few, but they look the same as the code above.)
