开发者

Incy IdDayTime Connection problem

I created some software which is using some kind of selfmade license files under Delphi 5 Enterprise. The license expires after a certain time to prevent further use. As it is easy to adjust any desired date on a PC I am trying to get a connection to an internet timeserver.

I tried sev开发者_运维问答eral codes I found in the internet, none worked. My last try was installing the Indy components and using some simple code like the following:

IdDayTime1.Host := .... desired timeserver IdDayTime1.Connect; Label1.Caption := IdDayTime1.DayTimeStr; IdDayTime1.Disconnect;

I always do not get a connection to a timeserver. This happens in different network areas (at work, at home,...), even if all typical internet software (like firefox, IE,...) works very well in all these networks. So I am sure to have a proper internet connection.

What might be the reason for my problems ? Do I have to define some special details like ports or sth. else ?

Thanks in advance for any help


Which version of Indy did you use? Which time server are you using? There are several different date/time protocols on the internet. TIdDayTime implements the Daytime Protocol (RFC 867), which is meant for retreiving human-readable date/time strings. For machine-parsable date/time data, especially if you intend to update the PC's clock with it, then use TIdSNTP (Simple Network Time Protocol, RFC 2030) or TIdTime (Time Protocol, RFC 868) instead.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜