Click here to Skip to main content
11,924,995 members (53,944 online)
Click here to Skip to main content
Add your own
alternative version


94 bookmarked

SNTP Client in C#

, 27 Aug 2001 CPOL
Rate this:
Please Sign up or sign in to vote.
Implementation of the Simple Network Time Protocol (RFC 2030) in C#
  • Download source files - 12 Kb
  • Download demo project - 5 Kb

    Sample Image - ntpclient.jpg


    Though not obvious, time synchronization is sometimes important. The best example is the Kerberos authentication protocol, which requires the resources to be synchronized within minutes or even seconds, but there are other situations as well. The Network Time Protocol (NTP) and its simplified form (SNTP) are widely used to synchronize network resources, due to their simplicity and effectiveness. There are many programs available that synchronize your PC's clock with that of a time server. Dimension 4 is my favorite.

    In case you need time synchronization embedded into your software, here is the C# alternative. It's simple, fast and integrates seamlessly with the .NET platform. There is a Java implementation of a NTP client by Michel Van den Bergh, but I don't have the URL anymore. Maybe Michel reads this and will send me a note.

    There are several time severs on the Internet and the list below contains those operated by NIST. If you need more, use a search engine.

    Name IP Address Location NIST, Gaithersburg, Maryland NIST, Gaithersburg, Maryland NIST, Boulder, Colorado NIST, Boulder, Colorado NIST, Boulder, Colorado University of Colorado, Boulder NCAR, Boulder, Colorado Microsoft, Redmond, Washington Datum, San Jose, California Abovnet, Virginia Abovnet, New York City Abovnet, San Jose, California

  • License

    This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


    About the Author

    Valer BOCAN
    Romania Romania
    I am a software engineer based in Timișoara, Romania and currently hold the position of software architect for one of the largest companies in the world.

    I invented a dialect of the Forth programming language and implemented the first Forth compiler for the .NET platform. I reverse-engineered the communication protocol of some GPS trackers and wrote from scratch a vehicle tracking system that is currently used to track my two cars. I hold a PhD in computer science and I am the author of several papers and a book chapter. In the 90s I wrote several computer viruses in assembly language for my own research and I was the first to devise a technique to deter heuristic virus scanners. In short, a humble man.

    You may also be interested in...

    Comments and Discussions

    GeneralLicense Pin
    Captain Groovy4-Feb-10 15:00
    memberCaptain Groovy4-Feb-10 15:00 
    GeneralRe: License Pin
    Valer BOCAN4-Feb-10 18:43
    memberValer BOCAN4-Feb-10 18:43 

    General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

    Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.

    | Advertise | Privacy | Terms of Use | Mobile
    Web04 | 2.8.151125.3 | Last Updated 28 Aug 2001
    Article Copyright 2001 by Valer BOCAN
    Everything else Copyright © CodeProject, 1999-2015
    Layout: fixed | fluid