// ClassicalSharp copyright 2014-2016 UnknownShadow200 | Licensed under MIT
using System;
namespace ClassicalSharp.Network.Protocols {
public abstract class IProtocol {
protected Game game;
protected NetworkProcessor net;
protected NetReader reader;
protected NetWriter writer;
public IProtocol(Game game) {
this.game = game;
net = (NetworkProcessor)game.Server;
reader = net.reader;
writer = net.writer;
}
/// Initalises variables for this protocol.
/// Typically used to hook the packet handlers.
public virtual void Init() { }
/// Resets the state of the variables for this protocol.
public virtual void Reset() { }
/// Performs a tick (if required) for this protocol.
public virtual void Tick() { }
}
}