how to avoid tcpclient function open new ports all the time ?
3 views (last 30 days)
does anyone know how to avoid Matlab open a new port, everytime something received via tcp ?
Cant find anything about it in the documentation but opening and closing a port decreases performance a lot.
t = tcpclient("192.168.11.1",1045,"Timeout",1,"ConnectTimeout",300);
%t.BytesAvailabeFcn = @readbuffercallback; %if condition reached go to callback;
%data2 = 0;
%data = int8(data2);
datareceive = read(t,4,"uint8");
app.ServerantwortEditField.Value = int2str(datareceive);
with matlab2021a the old functions doesnt work anymore.
I just want to open a socket connection with one port and pass data through continiously.