initial commit
This commit is contained in:
+32
@@ -0,0 +1,32 @@
|
||||
using System.IO;
|
||||
|
||||
namespace Crysome.Common.Network.Packets.Client;
|
||||
|
||||
public class TakeScreenshotResponsePacket : IPacket
|
||||
{
|
||||
public byte[] ImageData { get; set; }
|
||||
|
||||
public TakeScreenshotResponsePacket()
|
||||
{
|
||||
}
|
||||
|
||||
public TakeScreenshotResponsePacket(byte[] imageData)
|
||||
{
|
||||
ImageData = imageData;
|
||||
}
|
||||
|
||||
public void Write(BinaryWriter w)
|
||||
{
|
||||
w.Write((ImageData != null) ? ImageData.Length : 0);
|
||||
if (ImageData != null)
|
||||
{
|
||||
w.Write(ImageData);
|
||||
}
|
||||
}
|
||||
|
||||
public void Read(BinaryReader r)
|
||||
{
|
||||
int count = r.ReadInt32();
|
||||
ImageData = r.ReadBytes(count);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user