why it always apears “Address already in use: Cannot bind”?

x=udp('192.168.2.20',166, 'LocalPort', 5030);
x.inputbuffersize=414720;
fopen(x);
fwrite(x,'get');
data=fread(x);
fclose(x);

댓글 수: 1

Try quitting MATLAB and trying again: you might have an old connection sitting around from a previous attempt.

댓글을 달려면 로그인하십시오.

답변 (1개)

Pulkit Goel
Pulkit Goel 2020년 7월 3일
You may have an older connection still alive. Try quitting MATLAB and try again.
You can also turn 'EnablePortSharing' on to make a connection even if the port is already in use.
x.EnablePortSharing = 'on';

카테고리

도움말 센터File Exchange에서 Introduction to Installation and Licensing에 대해 자세히 알아보기

태그

질문:

2018년 6월 11일

답변:

2020년 7월 3일

Community Treasure Hunt

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

Start Hunting!

Translated by