MCPcopy Create free account
hub / github.com/SmingHub/Sming / startWebServer

Function startWebServer

samples/WebcamServer/app/application.cpp:66–85  ·  view source on GitHub ↗

Will be called when station is fully operational

Source from the content-addressed store, hash-verified

64
65// Will be called when station is fully operational
66void startWebServer()
67{
68 // Initialize the camera
69 Vector<String> images;
70 for(unsigned int i = 1; i < 6; i++) {
71 String s = "img";
72 s.concat(i, DEC, 2);
73 s += ".jpeg";
74 images.add(s);
75 }
76 camera = new FakeCamera(images);
77 camera->init();
78
79 // .. and run the HTTP server
80 server.listen(80);
81 server.paths.set("/", onIndex);
82 server.paths.set("/stream", onStream);
83 server.paths.set("/favicon.ico", onFavicon);
84 server.paths.setDefault(onFile);
85}
86
87} // namespace
88

Callers

nothing calls this directly

Calls 6

setDefaultMethod · 0.80
concatMethod · 0.45
addMethod · 0.45
initMethod · 0.45
listenMethod · 0.45
setMethod · 0.45

Tested by

no test coverage detected