initial commit
This commit is contained in:
+32
@@ -0,0 +1,32 @@
|
||||
using System.IO;
|
||||
|
||||
namespace Crysome.Common.Network.Packets.Server;
|
||||
|
||||
public class GetDirectoryRequestPacket : IPacket
|
||||
{
|
||||
public string Path { get; set; }
|
||||
|
||||
public long RequestId { get; set; }
|
||||
|
||||
public GetDirectoryRequestPacket()
|
||||
{
|
||||
}
|
||||
|
||||
public GetDirectoryRequestPacket(string path, long requestId = 0L)
|
||||
{
|
||||
Path = path;
|
||||
RequestId = requestId;
|
||||
}
|
||||
|
||||
public void Write(BinaryWriter w)
|
||||
{
|
||||
w.Write(Path ?? "");
|
||||
w.Write(RequestId);
|
||||
}
|
||||
|
||||
public void Read(BinaryReader r)
|
||||
{
|
||||
Path = r.ReadString();
|
||||
RequestId = ((r.BaseStream.Position < r.BaseStream.Length) ? r.ReadInt64() : 0);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user