C#-服务器和客户端之间的时间同步 [英] C# - Time synchronization between server and client

查看:739
本文介绍了C#-服务器和客户端之间的时间同步的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

你好,

我正在用C#编写服务器-客户端应用程序.
我需要在服务器和客户端之间进行同步.
我需要它,因为每次客户端向服务器发送消息时,它(客户端)都必须知道服务器中现在的确切时间.

在哪里可以找到有关它的信息?

非常感谢!

Hello,

I am writing server-client application in C#.
I need to make synchronization between server and client.
I need it because every time when the client sends a message to the server, it (the client) has to know what is the exact time now in the server.

Where can I find information about it?

Thanks a lot!

推荐答案

为什么客户端需要知道服务器上的时间?该消息在服务器上发送到哪里?我只是发送消息,然后让服务器上的进程告知时间.
Why does the client need to know the time on the server? Where is this message being sent to on the server? I would just send the message and let the process on the server tell the time.


看看这篇文章
Have a look at this post here[^].

It discusses various way to do this plus recommended practices.


这篇关于C#-服务器和客户端之间的时间同步的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆