コード例 #1
0
ファイル: ReceiveFile.cs プロジェクト: NucleusDE/NewTalking
 public ReceiveFile(DataPackage data)
 {
     FileRequestConvert frc = new FileRequestConvert();
     rfr = frc.ConvertToData_Receive(data.Data);
     remoteClient = data.Client;
 }
コード例 #2
0
ファイル: DataConvert.cs プロジェクト: NucleusDE/NewTalking
 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;
 }