From: Jonas on
Hello,

I'm using UDP to communicate between Matlab programs on separate computers. The two programs essentially operate in a master/slave configuration. For some reason, the first datagram sent from the master doesn't trigger the datagramreceivedfcn at the slave most, but not all the time. This causes the master to hang, since it is waiting for a response from the slave. I can interrupt at the master, which causes a second datagram to be sent to the slave. The slave typically sees the second datagram, and afterward works as expected.

Any idea why this happens or how I might rectify the situation?

I'm using fwrite to send information over the connection, and fread to read it. The datagramreceviedfcn is used only on the slave side.

Thanks.