From a8cdd28178182243d53fed1bf54deec160f44916 Mon Sep 17 00:00:00 2001 From: Jin857 Date: Sat, 11 Jan 2025 14:44:17 +0800 Subject: [PATCH] =?UTF-8?q?=20=E6=B7=BB=E5=8A=A0=20NTP(Network=20Time=20Pr?= =?UTF-8?q?otocol)=E5=8D=8F=E8=AE=AE=20=E7=94=A8=E6=B3=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/README.md b/README.md index 96499e5..6d8f26a 100644 --- a/README.md +++ b/README.md @@ -111,6 +111,10 @@ ntp4.aliyun.com ntp5.aliyun.com ntp6.aliyun.com ntp7.aliyun.com +***用法*** +```dart +DateTime ntpTime = await NTP.now(lookUpAddress: "ntp.aliyun.com",port: 123); +``` **Socket链接逻辑** 将socket链接分成两部分: (链接成功之前,链接成功之后)这里是根据是否有返回消息/结合onDone来判断