(S)NTP Client Code

S

ShaneO

I'm seeking an example of VB .NET 2005/08 code to request the Date/Time
from an NTP Server. I've seen some very early .NET examples using API's
and hundreds of lines of code, but I trust something more recent and
simpler exists that I'm not aware of.

Yes, I've Googled my head off but can't seem to find what I'm looking for.

Thanks in advance for any tips/links you are able to provide.

ShaneO

There are 10 kinds of people - Those who understand Binary and those who
don't.
 
S

ShaneO

SEDGE said:
Hi

I have the same requirement and here's what I found:

Here is an NTP Client written in C#
http://www.codeproject.com/KB/IP/ntpclient.aspx

And here is a neat converter to turn it into VB:
http://labs.developerfusion.co.uk/convert/csharp-to-vb.aspx

It has some errors in the conversion and I plan to check if I can resolve
them.

Good luck to us both.
Regards
Steve
Thank-you Steve for the link. It is actually one that I'd found myself
at an earlier time. By the looks of it we're both going to have to
settle for this as the best example, at least it is easy to convert.

I'm busy with another project right now but hope to have some time in a
couple of weeks to re-visit this one. I will post my results once I
have this worked out.

Regards,

ShaneO

There are 10 kinds of people - Those who understand Binary and those who
don't.
 
S

SEDGE

The converter I use has the distinct advantage of being free. I'm not in the
business of converting masses of code, just samples I find from time to time
to solve specific provlems.

The problems with the NTP Client have turned out to be:
- Public variables not CLS Compliant (names starting with an underscore)
- implicit Type conversions because I run with Strict On

Haven't got around to testing the Client yet.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top