TShock/TShockAPI/Net/BaseMsg.cs
high b2f47f57ac Updated to new binary (with the api merged).
Removed System.Drawing dependency
2011-09-24 18:30:19 -04:00

39 lines
998 B
C#

using System;
using System.Collections.Generic;
using System.IO.Streams;
using System.Linq;
using System.Text;
using System.IO.Streams;
namespace TShockAPI.Net
{
public class BaseMsg : IPackable
{
public virtual PacketTypes ID
{
get { throw new NotImplementedException("Msg ID not implemented"); }
}
public void PackFull(System.IO.Stream stream)
{
long start = stream.Position;
stream.WriteInt32(1);
stream.WriteInt8((byte)ID);
Pack(stream);
long end = stream.Position;
stream.Position = start;
stream.WriteInt32((int)(end - start) - 4);
stream.Position = end;
}
public virtual void Unpack(System.IO.Stream stream)
{
throw new NotImplementedException();
}
public virtual void Pack(System.IO.Stream stream)
{
throw new NotImplementedException();
}
}
}