UDP fread not returning entire datagram

4 views (last 30 days)
Jay on 15 Apr 2013
I have an application where I am using UDP to get data from another application. I have my UDP object in DatagramTerminateMode, and I am calling fread in my callback.
The application was working just fine until today, and I am not exactly sure what I changed. Some calls to fread are only returning 256 bytes instead of roughly 8000 bytes. If I add a command to my callback and leave off the semicolon it seems to make everything work again.
This would suggest that fread is being called before data is ready, but I am in DatagramTerminateMode so there should always be a datagram available when the callback is executed.
You may also be thinking... "are you sure that datagram isn't actually 256 bytes?" Well I am rather certain that is it not... When I debug the other application it appear to never be sending a datagram less than 8000 bytes.
Walter Roberson
Walter Roberson on 19 Apr 2013
I think you should take this to tech support.

Sign in to comment.

Answers (0)

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!