MCPcopy Create free account
hub / github.com/FastLED/FastLED / start

Method start

src/fl/stl/asio/http/server.cpp.hpp:273–294  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

271}
272
273bool Server::start(int port) {
274 if (mRunning) {
275 mLastError = "Server already running";
276 return false;
277 }
278
279 if (!setup_listen_socket(port)) {
280 return false;
281 }
282
283 mPort = port;
284 mRunning = true;
285 mLastError.clear();
286
287 // Register with async system for automatic updates
288 if (!mAsyncRunner) {
289 mAsyncRunner = fl::make_unique<ServerAsyncRunner>(this);
290 task::Executor::instance().register_runner(mAsyncRunner.get());
291 }
292
293 return true;
294}
295
296void Server::stop() {
297 if (!mRunning) return;

Callers 2

addMethod · 0.45
connectMethod · 0.45

Calls 8

esp_err_to_nameFunction · 0.85
to_httpd_methodFunction · 0.85
register_runnerMethod · 0.80
clearMethod · 0.45
getMethod · 0.45
sizeMethod · 0.45
c_strMethod · 0.45
push_backMethod · 0.45

Tested by

no test coverage detected