using System;
using System.Net;
using System.Net.Sockets;

namespace SharpQuake
{
	internal interface INetLanDriver
	{
		string Name { get; }

		bool IsInitialized { get; }

		Socket ControlSocket { get; }

		bool Init();

		void Shutdown();

		void Listen(bool state);

		Socket OpenSocket(int port);

		int CloseSocket(Socket socket);

		int Connect(Socket socket, EndPoint addr);

		Socket CheckNewConnections();

		int Read(Socket socket, byte[] buf, int len, ref EndPoint ep);

		int Write(Socket socket, byte[] buf, int len, EndPoint ep);

		int Broadcast(Socket socket, byte[] buf, int len);

		string GetNameFromAddr(EndPoint addr);

		EndPoint GetAddrFromName(string name);

		int AddrCompare(EndPoint addr1, EndPoint addr2);

		int GetSocketPort(EndPoint addr);

		int SetSocketPort(EndPoint addr, int port);
	}
}
