Datagram memory issue
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller
-
- Posts: 5
- Joined: Tue Nov 13, 2018 4:57 pm
Datagram memory issue
Hello everyone!
I have a trouble with memory consumption. My app is using UDP:
"accept datagram connections on port 6250 with message "gotData"
Other app sends me UDP-datagrams about 20-30 times a second. it is OSC-messages. I receive them, parse and perform some actions depending of what was inside. But memory amount using by app is increasing as fast as many packets was received. It seems like all these messages are stored somewhere. But i don't need it - it can be erased or cleared right after parsing. How it can be done?
P.S. In C++ when opening UDP socket there is a flag - when it 0 (zero) - messages after receiving will be deleted from queue. May be there is the same thing in LiveCode?
Help me please!
I have a trouble with memory consumption. My app is using UDP:
"accept datagram connections on port 6250 with message "gotData"
Other app sends me UDP-datagrams about 20-30 times a second. it is OSC-messages. I receive them, parse and perform some actions depending of what was inside. But memory amount using by app is increasing as fast as many packets was received. It seems like all these messages are stored somewhere. But i don't need it - it can be erased or cleared right after parsing. How it can be done?
P.S. In C++ when opening UDP socket there is a flag - when it 0 (zero) - messages after receiving will be deleted from queue. May be there is the same thing in LiveCode?
Help me please!
Re: Datagram memory issue
Hi Ultravibeman,
welcome to the forum!
I just deleted you double posting, please only one thread per problem.
Hijacking another thread is no good style!
Best
Klais
welcome to the forum!
I just deleted you double posting, please only one thread per problem.
Hijacking another thread is no good style!
Best
Klais
Re: Datagram memory issue
Hello once again. My problem is still unsolved. Can anybody tell me how to manage udp datagrams? I don’t need them right after parsing - how can I clean up incoming bufer?
Re: Datagram memory issue
Ultravibeman <> UltraLive, but both with just ONE posting so far?
Come on!
Come on!
Re: Datagram memory issue
That is ok, I'm not sure your the real Klaus!
We all know how easy it would be to copy your name (if you were the real Klaus!!), and yet, you yourself misspelled it I wonder if you need to go back to all the threads your name got misspelled in and apologize!
We all know how easy it would be to copy your name (if you were the real Klaus!!), and yet, you yourself misspelled it I wonder if you need to go back to all the threads your name got misspelled in and apologize!
Re: Datagram memory issue
Hey, what EYE do with M-EYE name, is M-EYE business, BUDDY!
-
- Posts: 5
- Joined: Tue Nov 13, 2018 4:57 pm
Re: Datagram memory issue
Guys, i'm really need to solve this issue... Why the memory consumption is growing up?
How to flush incoming buffer or simillar action?
Code: Select all
global cedrPort
global lastPacket
on Listen
put "59876" into cedrPort
accept datagram connections on port cedrPort with message gotData
end Listen
on gotData tIP,nowData
...
...
do some things with nowData
...
...
delete variable nowData // This is my experiments)))))
close socket tIP // This is also i'm trying to find the way out
pass gotData // And this too
end gotData
Re: Datagram memory issue
Have you tried debug breakpoints and/or putting messages to the message box window to get a little more clarification on what is happening and when?