Comments (4)
Hi,
That file is not actually used any more (should be deleted from the repo). The portable library is now just a bait library, and the platform specific libraries are used at runtime. Opening the solution in VS will show that file isn't loaded in the portable project. All of the actual NtpClient code that is being compiled into assemblies has an 'else' condition on those statements which raises the ErrorOcurred event.
For the actual implementation being used, see the files;
https://github.com/Yortw/Yort.Ntp/blob/master/src/Yort.Ntp.Shared.StandardSockets/NtpClientStandardSockets.cs
https://github.com/Yortw/Yort.Ntp/blob/master/src/Yort.Ntp.WinRT/NtpClientWinRTSockets.cs
If you're not seeing the ErrorOccured event raised under some condition, could you please advise the platform & conditions required to reproduce?
Thanks.
from yort.ntp.
For example, this code should fail as the host cannot be resolved, and the ErrorOcurred event should be raised which will then write the exception details to the debug window. I tested this in a desktop console app.
static void Main(string[] args)
{
Yort.Ntp.NtpClient c = new Yort.Ntp.NtpClient("notanntpserver");
c.ErrorOccurred += client_ErrorOccurred;
c.BeginRequestTime();
}
private static void client_ErrorOccurred(object sender, Yort.Ntp.NtpNetworkErrorEventArgs e)
{
System.Diagnostics.Debug.WriteLine(e.Exception.ToString());
}
from yort.ntp.
I didn't test it yet but when I looked at the wrong file and it is implemented in the NuGet package that I get this is closed for me. Thanks!
from yort.ntp.
No problem, that file should have been removed earlier but somehow I missed it when implementing that change.
Thanks for reporting the potential issue.
from yort.ntp.
Related Issues (14)
- Something not right with nuget package? HOT 9
- Provide the lib as a .net standard library HOT 1
- Problem with Raspberry Pi HOT 1
- System.Net.EndPoint.Serialize throws System.NotImplementedException on Mono Linux HOT 1
- Nuget package is unsigned HOT 1
- Maui support
- Client_ErrorOccurred not being triggered properly
- Specific assembly exception HOT 21
- Get a problem trying to build .net core HOT 4
- Socket unsubscription to OnMessageReceived throws Exception "A method was called at an unexpected time." HOT 3
- NtpNetworkException when awaiting RequestTimeAsync() HOT 6
- Time issue HOT 2
- Android and iOS errors HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from yort.ntp.