Receive UDP data from multiple sources in Matlab
I n开发者_Go百科eed to set up a UDP reader in Matlab that receives data from a number of sources. I typically use this for a single data source:
[packet,~,~,senderaddress]=fread(s,s.BytesAvailable)
The problems are that I want to avoid waiting for the timeout, I don't have terminated data arriving, and packets are of unknown sizes. Has anyone else had this problem? Thanks
Why not using Java's networking capabilities. UDP File Exchange does some Java scripting to access a UDP socket. Define the max size of your packets (UDP datagrams can be up to 65536 bytes long) and the preferred timeout.
精彩评论