开发者

Receive UDP data from multiple sources in Matlab

开发者 https://www.devze.com 2023-01-15 02:21 出处:网络
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:

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.

0

精彩评论

暂无评论...
验证码 换一张
取 消