net.[hc]: allow multiple endpoints in single context

Endpoints will be attached to the context object using a new function
coap_attach_endpoint(). The sockfd component has been removed from
coap_context_t as it is accessible by the endpoint.
coap_endpoint_t has a new field 'context' that refers to the context
object the respective endpoint has been associated with, or NULL
if it is not attached to any context. An endpoint can be attached
to at least one context at a time.
This commit is contained in:
Olaf Bergmann committed 2016-04-08 15:14:20 +02:00
1 parent cfdfd030f9
commit 3d3eb02ad8
5 files changed
+34 -162

No files matched your search

+5 -2
View File
@@ -44,6 +44,9 @@ libcoap_@LIBCOAP_API_VERSION@_la_CFLAGS = \
-fPIE \
$(AM_CFLAGS)
## Platform-specific sources are located in platform_src
platform_src = src/platform/@PLATFORM@
## Define the source file list for the "libcoap.la" target.
## Note that it is not necessary to list header files which are already listed
## elsewhere in a _HEADERS variable assignment.
@@ -51,7 +54,6 @@ libcoap_@LIBCOAP_API_VERSION@_la_SOURCES = \
src/address.c \
src/async.c \
src/block.c \
src/platform/@PLATFORM@/coap_io.c \
src/coap_time.c \
src/debug.c \
src/encode.c \
@@ -64,7 +66,8 @@ libcoap_@LIBCOAP_API_VERSION@_la_SOURCES = \
src/str.c \
src/subscribe.c \
src/uri.c \
src/platform/@PLATFORM@/prng.c
$(platform_src)/coap_io.c \
$(platform_src)/prng.c
## Define the list of public header files and their install location.
## The list defined here will be used within the include/Makefile.am