why it always apears “Address already in use: Cannot bind”?
Ältere Kommentare anzeigen
x=udp('192.168.2.20',166, 'LocalPort', 5030);
x.inputbuffersize=414720;
fopen(x);
fwrite(x,'get');
data=fread(x);
fclose(x);
1 Kommentar
Walter Roberson
am 11 Jun. 2018
Try quitting MATLAB and trying again: you might have an old connection sitting around from a previous attempt.
Antworten (1)
Pulkit Goel
am 3 Jul. 2020
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';
Kategorien
Mehr zu Introduction to Installation and Licensing finden Sie in Hilfe-Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!