using System;
using System.Net;
using OpenTK;
using OpenTK.Input;
namespace ClassicalSharp {
/// Represents a connection to either a multiplayer server, or an internal single player server.
public abstract class INetworkProcessor {
public abstract bool IsSinglePlayer { get; }
/// Opens a connection to the given IP address and port, and prepares the initial state of the client.
public abstract void Connect( IPAddress address, int port );
public abstract void SendChat( string text, bool partial );
/// Informs the server of the client's current position and orientation.
public abstract void SendPosition( Vector3 pos, float yaw, float pitch );
/// Informs the server that the client placed or deleted a block at the given coordinates.
public abstract void SendSetBlock( int x, int y, int z, bool place, byte block );
/// Informs the server that using the given mouse button,
/// the client clicked on a particular block or entity.
public abstract void SendPlayerClick( MouseButton button, bool buttonDown, byte targetId, PickedPos pos );
public abstract void Tick( double delta );
public abstract void Dispose();
public string ServerName;
public string ServerMotd;
/// Whether the network processor is currently connected to a server.
public bool Disconnected;
/// Whether the client should use extended player list management, with group names and ranks.
public bool UsingExtPlayerList;
/// Whether the server supports handling PlayerClick packets from the client.
public bool UsingPlayerClick;
/// Whether the server can handle partial message packets or not.
public bool ServerSupportsPartialMessages;
/// Whether the server supports receiving all code page 437 characters from this client.
public bool ServerSupportsFullCP437;
}
}