public bool Stop() { bool result = this.backend.NotNull() && this.backend.Stop(); this.backend = null; return(result); }
public bool StartThreaded(uint port) { return((this.backend = Http.Server.StartThreaded(this.Process, port)).NotNull()); }
public static bool Run(Action<Connection> connected, uint port) { bool result; using (Server server = new Server(connected)) result = server.Run(port); return result; }
public static bool Run(Action<Connection> connected, Uri.Endpoint endPoint) { bool result; using (Server server = new Server(connected)) result = server.Run(endPoint); return result; }
public static Server Start(Action<Connection> connected, uint port) { Server result = new Server(connected); if (!result.Start(port)) { result.Dispose(); result = null; } return result; }
public static Server Start(Action<Connection> connected, Uri.Endpoint endPoint) { Server result = new Server(connected); if (!result.Start(endPoint)) { result.Dispose(); result = null; } return result; }