receive multicast data with udp port and configure multicast matlab

hi
I am trying to receive multicast data from udp connection
it goes like this
u=udpport("bytes","LocalHost","127.0.0.1","LocalPort",15005);
configureMulticast(u.'226.1.1.1')
data=read(u,u.NumBytesAvailable);
this is not reciving anything in data
Pleae help

回答 (1 件)

Ashutosh Singh Baghel
Ashutosh Singh Baghel 2021 年 10 月 21 日

0 投票

Hi Rashi,
I believe you wish to configure Multicast settings to a UDP socket 'u'. Please refer to the followinf example from the MATLAB Documentation page on 'udpport.configureMuilticast'.
u = udpport("byte","LocalHost","127.0.0.1","LocalPort",15005);
configureMulticast(u,"226.1.1.1");
Also, please refer to the page on 'udpport' and 'read'.

カテゴリ

ヘルプ センター および File ExchangeStartup and Shutdown についてさらに検索

タグ

質問済み:

2021 年 10 月 14 日

回答済み:

2021 年 10 月 21 日

Community Treasure Hunt

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

Start Hunting!

Translated by