using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace IFS
{
public enum ConnectionType
{
Connectionless, /* echo, name resolution, etc. */
BSP, /* FTP, Telnet, CopyDisk, etc. */
}
public struct PUPProtocolEntry
{
public PUPProtocolEntry(string friendlyName, UInt32 socket, ConnectionType connectionType, PUPProtocolBase implementation)
{
FriendlyName = friendlyName;
Socket = socket;
ConnectionType = connectionType;
ProtocolImplementation = implementation;
}
///
/// Indicates the 'friendly' name for the protocol.
///
public string FriendlyName;
///
/// Indicates the socket used by the protocol
///
public UInt32 Socket;
///
/// Indicates the type of connection (connectionless or BSP-based)
///
public ConnectionType ConnectionType;
public PUPProtocolBase ProtocolImplementation;
}
///
/// Base class for all PUP-based protocols.
///
public abstract class PUPProtocolBase
{
public PUPProtocolBase()
{
}
///
/// Called by dispatcher to send incoming data destined for this protocol.
///
///
public abstract void RecvData(PUP p);
}
}