SendAsync Behaviour #1170
-
Problem: I am trying to use CUDPSender::SendAsync instead of Send. However, there's a few obstacles I've ran into and I want to ask if there's anything I'm missing. In snd_sample.cpp, I noticed that TransmitToUDP is hardcoded to Send and not SendAsync so I had a naive modification of just changing it to SendAsync, however SendAsync does not return anything, so for now it just returns len_. This probably will not work.
I also noticed that the member variable I also have another question regarding the iocontext, from what I understand, this recursively calls the SendAsync till the msg is fully sent, but wouldn't this call iocontext.stop multiple times? And iocontext.run() is only invoked once (within the SendAsync with 3 params).
Our goal is to send async and want to know what's the proper way to go about implementing this for UDP? |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 5 replies
-
Hi @g-tejas, That function is not part of the public API, it is part of the internal implementation of the eCAL UDP Layer. Currently, it is not used. I don't see a way how you can access it. I also don't really see a reason why you would want to access it. Have you tried the basic eCAL Samples, that demonstrate how to transmit data via eCAL? https://eclipse-ecal.github.io/ecal/getting_started/hello_world.html If so, what exactly are you trying to achieve? |
Beta Was this translation helpful? Give feedback.
-
OK, now I understand what you are trying to achieve. So my first question would be: Is it your goal to work on eCAL and improve it? I am asking because you dug up that internal function and tried to use it. I usually assume that you are a user of eCAL. So let's see how your actual problem can be solved.
|
Beta Was this translation helpful? Give feedback.
OK, now I understand what you are trying to achieve.
So my first question would be: Is it your goal to work on eCAL and improve it? I am asking because you dug up that internal function and tried to use it.
I usually assume that you are a user of eCAL. So let's see how your actual problem can be solved.
std::condition_variable
) whenever another thread has put something in its queue. It send sends it out to eCAL. Putting data in that queue will be very fast and the data is then sent in the background