public void UpdateDeviceDetails(User user) { Device device = new Device { DeviceID = 0, ExternalIP = String.Empty, // This is empty because its easier for the server to get the external IP when it populates the connected devices list InternalIP = Globals.LocalIP.ToString(), HardwareID = Tools.GetHWID(), Name = Environment.MachineName, UserID = user.UserID }; Packet deviceInformationPacket = new Packet { Message = "UPDATE_DEVICE", User = user, Device = device }; SendData(_client, ClassSerializer.SerializeClass(deviceInformationPacket)); }
public void RequestFriends(User user) { // Pull friends from the database that belong to user Packet packet = new Packet {Message = "GET_FRIENDS", User = user}; SendData(_client, ClassSerializer.SerializeClass(packet)); }