conn: make conn_*_sendto require a conn object #4630
Closed
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Though GNRC (and afaik @kaspar030's stack to) are perfectly capable to send connection-less transport data without a connection most other stack APIs don't. While opening a connection object in
sendto
could be an alternative (though to me this defies the lightweight aspect ofconn
), stack internal checks make it impossible to send from a port where already a connection is open. To demonstrate the problem, here is a little echo server, that fails for both lwIP and emb6 due to this API incompatibility:Partly related #4474.