473,563 Members | 2,709 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

(S)NTP Client Code

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.
Jul 8 '08 #1
4 6761
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/co...arp-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
"ShaneO" wrote:
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.
Jul 16 '08 #2
To convert C# AND other languages to VB.Net
http://www.tangiblesoftwaresolutions.com/
is the best converters I have found until now

good luck
"SEDGE" <SE***@discussi ons.microsoft.c omwrote in message
news:7E******** *************** ***********@mic rosoft.com...
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/co...arp-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
"ShaneO" wrote:
>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.
Jul 16 '08 #3
SEDGE wrote:
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/co...arp-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.
Jul 16 '08 #4
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.
"Gillard" wrote:
To convert C# AND other languages to VB.Net
http://www.tangiblesoftwaresolutions.com/
is the best converters I have found until now

good luck
"SEDGE" <SE***@discussi ons.microsoft.c omwrote in message
news:7E******** *************** ***********@mic rosoft.com...
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/co...arp-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
"ShaneO" wrote:
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.
Jul 16 '08 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
8667
by: Manzoorul Hassan | last post by:
I need to convert a date / time to NTP Timestamp, in HEX no less, and was wondering if there might be a module for it. Any ideas? I have been searching for NTP Timestamp under Perl but have not found much - yet. - manzoor
2
2807
by: 4Space | last post by:
Anyone know where I can find an NTP server in C#?? Sort of an open source tutorial type thing. Cheers
2
3395
by: Kirk | last post by:
Hello, I'm trying to get the current date/time from a (S)NTP server. It works with UdpClient class, but not with TcpClient class. I want to use TcpClient because i can set timeout values for reading/writing operations. The connect method generate a SocketException (10060 : timeout error) : try {
6
19941
by: bg_ie | last post by:
Hi, I wish to write a C program which obtains the system time and hence uses this time to print out its ntp equivalent. Am I right in saying that the following is correct for the seconds part of the ntp time? long int ntp.seconds = time(NULL) + 2208988800;
5
4266
by: Janto Dreijer | last post by:
I want to measure the packet delivery delays over various network links. For this I need to synchronise the times of the sender and receiver, either against NTP or eachother. Unfortunately I won't necessarily have root priviledges to change the PCs' clocks. So I'm looking for a way I can determine the offset and simply correct my...
8
3433
by: ashore | last post by:
Folks, I need to find and synch some php scripts to a NTP service somewhere. I'll appreciate any info on just where/how? -AS
3
7017
by: romcab | last post by:
Hi guys, I'm currently using NTP for time synchronization and I'm using public NTP server. I would like to ask how to create a local NTP server and what are the configurations needed. Is it possible to use a workstation which uses XP as the operating system? I hope you can help guys. Thanks.
1
3619
by: Nalika | last post by:
Hi guys, I want to use NTP for time synchronization and I'm using public NTP server. I would like to ask how to create a local NTP server and what are the configurations needed. I'm using a workstation which uses Linux as the operating system. I hope you can help guys. Thanks.
0
7583
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language...
0
7885
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. ...
0
8106
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
1
7638
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
0
7948
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
0
6250
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
1
5484
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes...
1
2082
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
0
923
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.