473,499 Members | 1,591 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 6743
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***@discussions.microsoft.comwrote in message
news:7E**********************************@microsof t.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***@discussions.microsoft.comwrote in message
news:7E**********************************@microsof t.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
8656
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...
2
2802
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
3391
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...
6
19929
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...
5
4265
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...
8
3427
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
7011
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...
1
3614
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...
0
7130
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
7007
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...
0
7220
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...
0
7386
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...
0
5468
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,...
0
4599
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
3090
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
1427
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 ...
1
664
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.