Re: [RFC] net: New API for applications to send and receive data


Jukka Rissanen
 

Hi Vinicius,

On Wed, 2016-04-27 at 12:10 -0300, Vinicius Costa Gomes wrote:
Hi Jukka,

Jukka Rissanen <jukka.rissanen(a)linux.intel.com> writes:


Signed-off-by: Jukka Rissanen <jukka.rissanen(a)linux.intel.com>
---
Hi,

current network application APIs in Zephyr are synchronous and a
bit of awkward to use in TCP. Because of these things, I propose
couple of new functions that are asynchronous and easier to use
by the application. These APIs require net_buf fragmentation
support
that I sent earlier.
At least from Soletta side, what I feel is lacking from the Zephyr
network stack API-wise is this:

- net_writeto(struct net_context *context, struct net_buf *buf,
       struct net_addr *to, uint16_t port)

- net_readfrom(struct net_context *context, struct net_buf *buf,
       struct net_addr *from, uint16_t *port);

- net_context_add_addr(struct net_context *context,
       struct net_addr *local_addr, uint16_t port);
Sure, if the API's make sense then just send the patches.



See what Ivan needed to do here:

https://github.com/solettaproject/soletta/blob/master/src/lib/comms/s
ol-socket-impl-zephyr.c#L260

Cheers,
Jukka

Join devel@lists.zephyrproject.org to automatically receive all group messages.