https://bugzilla.xamarin.com/show_bug.cgi?id=8554
Added unit tests to cover the Asynchronous API and the Task Based API.
Fixed an issue with the Task Based API that would previously throw a
`NullReferenceException` when started as the `CancellationTokenSource`
was not instantiated.
The `CancellationTokenSource` was also not disposed of after use.
* capget is not part of libc (libSystem.dylib) on iOS (or OSX); and
* There's no working Process class to invoke `ping` by itself leading to
[FAIL] DllImportTest.LackOfCapget : System.InvalidOperationException : Process has not been started.
at System.Diagnostics.Process.get_HasExited () [0x00039] in /Users/poupou/git/xamarin/maccore/_build/Library/Frameworks/Xamarin.iOS.framework/Versions/git/src/mono/mcs/class/System/System.Diagnostics/Process.cs:184
It's technically possible to implement ping on iOS [1] so the code is
not totally removed from the build (API remains identical to existing).
[1] https://bugzilla.xamarin.com/show_bug.cgi?id=964
Modulo the GUID in the assembly and the GUID embedded in some
field initializers that use the assembly GUID for their name, the
assemblies are idential before and after the patch.
* Ping.cs: generates a random ICMP Identifier field per Echo to help
match up pings and their responses. Now has valid TTL and timeouts apply to
the correct pings. Also fixed bugs were received Sequence and
Identifier would be corrupt for values >255, and fixed corruption of
the Data field.
Patch by Michael Walsh that fixes bug #627330.
* Ping.cs: Try to detect the path to the bin command, since different
Unix systems store it in different places.
Fixes#519272.
svn path=/trunk/mcs/; revision=147831
* Ping.cs: we just need the address(es), not a host entry. This avoids
querying the DNS server(s) when the target is an IP address.
svn path=/trunk/mcs/; revision=133459
* Ping.cs: close the socket in SendPrivileged. Use Buffer.BlockCopy
instead of Array.Copy. Return IPStatus.Unknown instead of throwing an
exception for unknown status codes received.
svn path=/trunk/mcs/; revision=121278
* Ping.cs: the time for the arguments of 'ping' is in seconds. Don't
read the output of running the command, since we trust the return
code.
svn path=/trunk/mcs/; revision=119534
* Ping.cs: Use /bin/ping when running as non-root user
(implementation by Jackson Harper <[email protected]>) or use
raw sockets if running as root or if the current process has the
CAP_NET_RAW Linux capability set while running as an unprivileged
user.
svn path=/trunk/mcs/; revision=107871
* Ping.cs : Do not call OnPingCompleted() at CancelAsync() it should
be called at RunWorkerCompleted. Simplified RunWorkerCompleted.
svn path=/trunk/mcs/; revision=87971