lwip-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [lwip-users] Best way to send sensor data from RAW sockets


From: address@hidden
Subject: Re: [lwip-users] Best way to send sensor data from RAW sockets
Date: Tue, 06 Mar 2012 18:08:11 +0100
User-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.6; rv:10.0.2) Gecko/20120216 Thunderbird/10.0.2

Paul Archer wrote:
I am now trying to setup a raw UDP socket that will accept audio data
from a queue and send it out over UDP.
I have the receive side working well with raw sockets and can
correctly receive and hand the data off to the DAC.

Just for clarity: I'm assuming you mean using a raw API udp pcb here (as opposed to "BSD" sockets in raw mode, i.e. not UDP or TCP but another, application-managed transport protocol)?

My question is, what is the best way for my audio data to get into a
packet and send it?

I guess the best way is still using sys_timeout(). There's of course nothing wrong with correct programming layering. As it seems you are currently using some kind of queue for that, you can either - wait on that queue and then call tcpip_callback() when you know you want to send a packet or - convert your API from queue handling to a more generic interface, then your queue can be one kind to implement that interface, collecting packet data and calling tcpip_callback() to send a packet would be another way to implement that interface.

Simon



reply via email to

[Prev in Thread] Current Thread [Next in Thread]