how can i free the port to be used when fopen a udp by function fopen

when i run the ocde :
obj.m_udp = udp(192.168.1.1,'RemotePort',50001,'LocalPort',50002);
fopen(obj.m_udp);
then a error in command view:
error: icinterface/fopen
Unsuccessful open: Address already in use: Cannot bind

回答 (1 件)

R
R 2024 年 5 月 16 日

0 投票

You can refer to the following troubleshooting steps to make sure that there are no other applications or MATLAB instances running that might be using the same IP address and port.

カテゴリ

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

質問済み:

2023 年 9 月 12 日

回答済み:

R
R
2024 年 5 月 16 日

Community Treasure Hunt

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

Start Hunting!

Translated by