[ntp:questions] Can we write NTP server using c#
David Woolley
david at ex.djwhome.demon.co.uk.invalid
Mon May 26 18:49:41 UTC 2008
rajeshkankran at gmail.com wrote:
>
> I m having code for ntp Client...
> But i want to wtite code for sever also..
> can i write code for server...means is that possible or not
One basic rule about forum postings: although it is important to
summarise the complete question in the subject, one should write the
body as though the subject had not been seen; I completely missed the
mention of C# when I first read this.
C# is a Common Language Runtime, byte code language and therefore
vulnerable to unexpected delays as a result of garbage collection. It
therefore isn't a good choice of language for any timing sensitive
application.
Once you have an NTP client, as against an SNTP one, writing a server is
a relatively trivial exercise. If C# is able to support a client, it
can certainly support a server, as you only need read access to the
clock, but a client needs both read and write access. It's this fact
that makes people think you are not asking the question that you intended.
Note that, without using platform invoke, you are not going to get
particularly good resolution from the time on Windows.
Basically, by using C# you are putting obstacles in your way, which are
pointless, as there is a perfectly good native version of nptd, and it
is free.
More information about the questions
mailing list