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; }