/*
This file is part of ContrAlto.
ContrAlto is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
ContrAlto is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU Affero General Public License for more details.
You should have received a copy of the GNU Affero General Public License
along with ContrAlto. If not, see .
*/
using System.IO;
namespace Contralto.IO
{
public delegate void ReceivePacketDelegate(MemoryStream data);
///
/// Provides a generic interface for host network devices that can encapsulate
/// Alto ethernet packets.
///
public interface IPacketEncapsulation
{
///
/// Registers a callback delegate to handle packets that are received.
///
///
void RegisterReceiveCallback(ReceivePacketDelegate callback);
///
/// Sends the specified word array over the device.
///
///
///
void Send(ushort[] packet, int length);
///
/// Shuts down the encapsulation provider.
///
void Shutdown();
}
}