Page 1 of 1

Datagram memory issue

Posted: Tue Nov 13, 2018 5:10 pm
by Ultravibeman
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!

Re: Datagram memory issue

Posted: Tue Nov 13, 2018 7:09 pm
by Klaus
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

Re: Datagram memory issue

Posted: Fri Oct 04, 2019 6:50 pm
by UltraLive
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

Posted: Fri Oct 04, 2019 7:05 pm
by Klaus
Ultravibeman <> UltraLive, but both with just ONE posting so far?
Come on! 8)

Re: Datagram memory issue

Posted: Fri Oct 04, 2019 9:50 pm
by bogs
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 :shock:
ItIsKlausDangit.png
The name is "KLAUS", if you can't spell it, COPY it!
I wonder if you need to go back to all the threads your name got misspelled in and apologize! :P

Re: Datagram memory issue

Posted: Sat Oct 05, 2019 10:19 am
by Klaus
Hey, what EYE do with M-EYE name, is M-EYE business, BUDDY! :D

Re: Datagram memory issue

Posted: Sat Oct 05, 2019 11:11 am
by bogs
:mrgreen: :mrgreen: :mrgreen:

Re: Datagram memory issue

Posted: Tue Oct 08, 2019 6:55 pm
by Ultravibeman
Guys, i'm really need to solve this issue... Why the memory consumption is growing up?

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
How to flush incoming buffer or simillar action?

Re: Datagram memory issue

Posted: Tue Oct 08, 2019 11:54 pm
by cpuandnet
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?