示例#1
0
        public bool GetSocketInfo(NetSocketHandle socket, out SteamID steamIDRemote,
                                  out SNetSocketState socketStatus, out uint ipRemote, out ushort portRemote)
        {
            CheckIfUsable();
            ulong rawCreator      = 0;
            int   rawSocketStatus = 0;

            ipRemote   = 0;
            portRemote = 0;
            bool result = NativeMethods.Networking_GetSocketInfo(socket.AsUInt32, ref rawCreator,
                                                                 ref rawSocketStatus, ref ipRemote, ref portRemote);

            steamIDRemote = new SteamID(rawCreator);
            socketStatus  = (SNetSocketState)rawSocketStatus;
            return(result);
        }
 public bool GetSocketInfo(NetSocketHandle socket, out SteamID steamIDRemote,
     out SNetSocketState socketStatus, out uint ipRemote, out ushort portRemote)
 {
     CheckIfUsable();
     ulong rawCreator = 0;
     int rawSocketStatus = 0;
     ipRemote = 0;
     portRemote = 0;
     bool result = NativeMethods.Networking_GetSocketInfo(socket.AsUInt32, ref rawCreator,
         ref rawSocketStatus, ref ipRemote, ref portRemote);
     steamIDRemote = new SteamID(rawCreator);
     socketStatus = (SNetSocketState)rawSocketStatus;
     return result;
 }