UnknownShadow200 98d435b110 fix licensing
2017-01-20 09:12:04 +11:00

30 lines
833 B
C#

// Copyright 2014-2017 ClassicalSharp | Licensed under BSD-3
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;
}
/// <summary> Initalises variables for this protocol. </summary>
/// <remarks> Typically used to hook the packet handlers. </remarks>
public virtual void Init() { }
/// <summary> Resets the state of the variables for this protocol. </summary>
public virtual void Reset() { }
/// <summary> Performs a tick (if required) for this protocol. </summary>
public virtual void Tick() { }
}
}