If user has enabled CONFIG_NET_DEBUG_APP, then the debugging
version of _net_app_select_net_ctx() was not properly declared
and it caused compile error.
Fixes#4481
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
We should not close the TLS connection immediately if the TLS
data is not yet sent. So if user calls net_app_close() and we
still have data pending, then send the TLS data and only after
that close the connection.
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
TLS and DTLS are not related to each other so allow DTLS to be
enabled even if TLS is disabled.
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
The server needs global enable/disable status instead of only being
able to enable or disable just the TLS server part.
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
Add API that allows net-shell to get net_app context information
that can be used to debug net_app connections.
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
The network application API is a higher level API for creating
client and server type applications. Instead of applications
dealing with low level details, the network application API
provides services that most of the applications can use directly.
This commit removes the internal net_sample_*() API and converts
the existing users of it to use the new net_app API.
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>