// This file is provided under The MIT License as part of RiptideNetworking. // Copyright (c) Tom Weiland // For additional information please see the included LICENSE.md file or view it on GitHub: // https://github.com/RiptideNetworking/Riptide/blob/main/LICENSE.md using System; namespace Riptide.Transports { /// Defines methods, properties, and events which every transport's server must implement. public interface IServer : IPeer { /// Invoked when a connection is established at the transport level. event EventHandler Connected; /// ushort Port { get; } /// Starts the transport and begins listening for incoming connections. /// The local port on which to listen for connections. void Start(ushort port); /// Closes an active connection. /// The connection to close. void Close(Connection connection); /// Closes all existing connections and stops listening for new connections. void Shutdown(); } }