Beispiel #1
0
        internal void ConvertPingLocationToString(ref PingLocation location, out string pszBuf)
        {
            IntPtr mempszBuf = Helpers.TakeMemory();

            _ConvertPingLocationToString(Self, ref location, mempszBuf, (1024 * 32));
            pszBuf = Helpers.MemoryToString(mempszBuf);
        }
 internal float GetLocalPingLocation(ref PingLocation result)
 {
     return(_GetLocalPingLocation(Self, ref result));
 }
 internal bool ParsePingLocationString([MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof(Utf8StringToNative))] string pszString, ref PingLocation result)
 {
     return(_ParsePingLocationString(Self, pszString, ref result));
 }
 internal void ConvertPingLocationToString(ref PingLocation location, StringBuilder pszBuf, int cchBufSize)
 {
     _ConvertPingLocationToString(Self, ref location, pszBuf, cchBufSize);
 }
 public static int EstimatePingTo(PingLocation target)
 {
     return(SteamNetworkingUtils.Internal.EstimatePingTimeFromLocalHost(ref target));
 }
Beispiel #6
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(PingLocation target)
 {
     return(Internal.EstimatePingTimeFromLocalHost(ref target));
 }
Beispiel #7
0
 internal bool ParsePingLocationString(string pszString, ref PingLocation result)
 {
     return(_ParsePingLocationString(Self, pszString, ref result));
 }
 private static extern float _GetLocalPingLocation(IntPtr self, ref PingLocation result);
Beispiel #9
0
        internal int EstimatePingTimeBetweenTwoLocations(ref PingLocation location1, ref PingLocation location2)
        {
            var returnValue = _EstimatePingTimeBetweenTwoLocations(Self, ref location1, ref location2);

            return(returnValue);
        }
Beispiel #10
0
        internal float GetLocalPingLocation(ref PingLocation result)
        {
            var returnValue = _GetLocalPingLocation(Self, ref result);

            return(returnValue);
        }
 private static extern void _ConvertPingLocationToString(IntPtr self, ref PingLocation location, IntPtr pszBuf, int cchBufSize);
 private static extern int _EstimatePingTimeFromLocalHost(IntPtr self, ref PingLocation remoteLocation);
 private static extern int _EstimatePingTimeBetweenTwoLocations(IntPtr self, ref PingLocation location1, ref PingLocation location2);
 internal int EstimatePingTimeBetweenTwoLocations(ref PingLocation location1, ref PingLocation location2)
 {
     return(_EstimatePingTimeBetweenTwoLocations(Self, ref location1, ref location2));
 }
Beispiel #15
0
        internal int EstimatePingTimeFromLocalHost(ref PingLocation remoteLocation)
        {
            var returnValue = _EstimatePingTimeFromLocalHost(Self, ref remoteLocation);

            return(returnValue);
        }
 internal int EstimatePingTimeFromLocalHost(ref PingLocation remoteLocation)
 {
     return(_EstimatePingTimeFromLocalHost(Self, ref remoteLocation));
 }
 private static extern bool _ParsePingLocationString(IntPtr self, [MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof(Utf8StringToNative))] string pszString, ref PingLocation result);