Read time data from server fast without new connection by tcpclient
Mostrar comentarios más antiguos
Hello everyone,
I would like to get the current time from a website, similar to the answer in
https://de.mathworks.com/matlabcentral/answers/477336-how-can-i-get-date-and-time-from-nist-server, where the following was described:
Nist_Time = tcpclient('time.nist.gov',13);
tcpdata = read(Nist_Time);
The read command works fine for the first time, but if I try
tcpdata = read(Nist_Time);
again, only
[]
is returned. I suspect that the connection to the server is gone after the first call, but I don't know how to maintain it.
I look forward to your feedback!
Respuesta aceptada
Más respuestas (0)
Categorías
Más información sobre TCP/IP Communication en Centro de ayuda y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!