コード例 #1
0
        internal void ConvertPingLocationToString(ref NetPingLocation location, out string pszBuf)
        {
            IntPtr mempszBuf = Helpers.TakeMemory();

            _ConvertPingLocationToString(Self, ref location, mempszBuf, (1024 * 32));
            pszBuf = Helpers.MemoryToString(mempszBuf);
        }
コード例 #2
0
 private static extern void _ConvertPingLocationToString(IntPtr self, ref NetPingLocation location, IntPtr pszBuf, int cchBufSize);
コード例 #3
0
 private static extern int _EstimatePingTimeFromLocalHost(IntPtr self, ref NetPingLocation remoteLocation);
コード例 #4
0
        internal int EstimatePingTimeFromLocalHost(ref NetPingLocation remoteLocation)
        {
            var returnValue = _EstimatePingTimeFromLocalHost(Self, ref remoteLocation);

            return(returnValue);
        }
コード例 #5
0
 private static extern int _EstimatePingTimeBetweenTwoLocations(IntPtr self, ref NetPingLocation location1, ref NetPingLocation location2);
コード例 #6
0
        internal int EstimatePingTimeBetweenTwoLocations(ref NetPingLocation location1, ref NetPingLocation location2)
        {
            var returnValue = _EstimatePingTimeBetweenTwoLocations(Self, ref location1, ref location2);

            return(returnValue);
        }
コード例 #7
0
        internal float GetLocalPingLocation(ref NetPingLocation result)
        {
            var returnValue = _GetLocalPingLocation(Self, ref result);

            return(returnValue);
        }
コード例 #8
0
 private static extern float _GetLocalPingLocation(IntPtr self, ref NetPingLocation result);
コード例 #9
0
        internal bool ParsePingLocationString([MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof(Utf8StringToNative))] string pszString, ref NetPingLocation result)
        {
            var returnValue = _ParsePingLocationString(Self, pszString, ref result);

            return(returnValue);
        }
コード例 #10
0
 private static extern bool _ParsePingLocationString(IntPtr self, [MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof(Utf8StringToNative))] string pszString, ref NetPingLocation result);
コード例 #11
0
 /// <summary>
 /// Same as PingLocation.EstimatePingTo, but assumes that one location is the local host.
 /// This is a bit faster, especially if you need to calculate a bunch of
 /// these in a loop to find the fastest one.
 /// </summary>
 public static int EstimatePingTo(NetPingLocation target)
 {
     return(Internal.EstimatePingTimeFromLocalHost(ref target));
 }