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

조회 수: 9 (최근 30일)
Qingying Tu
Qingying Tu 2018년 6월 11일
답변: Pulkit Goel 2020년 7월 3일
x=udp('192.168.2.20',166, 'LocalPort', 5030);
x.inputbuffersize=414720;
fopen(x);
fwrite(x,'get');
data=fread(x);
fclose(x);
  댓글 수: 1
Walter Roberson
Walter Roberson 2018년 6월 11일
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';

카테고리

Help CenterFile Exchange에서 Files and Folders에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by