public ReceiveFile(DataPackage data) { FileRequestConvert frc = new FileRequestConvert(); rfr = frc.ConvertToData_Receive(data.Data); remoteClient = data.Client; }
public ReceiveFileRequest ConvertToData_Receive(byte[] data) { ReceiveFileRequest receiveFile = new ReceiveFileRequest(); receiveFile.User_id = BitConverter.ToInt32(data, 0); receiveFile.File_name_length = BitConverter.ToInt16(data, 4); receiveFile.File_name = BitConverter.ToString(data, 6, receiveFile.File_name_length); return receiveFile; }