// Copyright Epic Games, Inc. All Rights Reserved. using EpicGames.UBA.Impl; namespace EpicGames.UBA { /// /// Base interface for a server instance /// public interface IServer : IBaseInterface { /// /// Start the server /// /// Ip address or host name /// The port to use, -1 for default /// Enable crypto by using a 32 character crypto string (representing a 16 byte value) /// public abstract bool StartServer(string ip = "", int port = -1, string crypto = ""); /// /// Stop the server /// public abstract void StopServer(); /// /// Add a named connection to the server /// /// The name of the connection /// Success public abstract bool AddNamedConnection(string name); /// /// Adds a client that server will try to connect one or more tcp connections to /// /// The ip of the listening client /// The port of the listening client /// Enable crypto by using a 32 character crypto string (representing a 16 byte value) /// Success public abstract bool AddClient(string ip, int port, string crypto = ""); /// /// Create a IServer object /// /// Maximum number of workers /// Send size in bytes /// The logger /// Use Quic protocol instead of tcp for communication between host and helpers /// The IServer public static IServer CreateServer(int maxWorkers, int sendSize, ILogger logger, bool useQuic) { return new ServerImpl(maxWorkers, sendSize, logger, useQuic); } } }