Apollo 1.0.0 release
apollo/modules/hmi/web/hmi_main.py
…
gflags.DEFINE_string(‘host’, ‘0.0.0.0’, ‘Host of the HMI server.’)
gflags.DEFINE_integer(‘port’, 8887, ‘Port of the HMI server.’)
…
return handlers.socketio.run(handlers.app, host=FLAGS.host, port=FLAGS.port)
…
Apollo 1.5.0 release
apollo/modules/hmi/web/hmi_main.py
…
conf = Config.get_pb()
…
return handlers.socketio.run(handlers.app,
host=conf.server.binding_ip,
port=conf.server.port,
**kwargs)
apollo/modules/hmi/proto/config.proto
…
optional string binding_ip = 1 [default = “0.0.0.0”];
optional string domain = 2 [default = “apollo.hmi”];
optional int32 port = 3 [default = 8887];
…
Apollo 2.0.0 release
// Initialize and run the web server which serves the dreamview htmls and
// javascripts and handles websocket requests.
std::vectorstd::string options = {
“document_root”, FLAGS_static_file_dir, “listening_ports”,
FLAGS_server_ports, “websocket_timeout_ms”, FLAGS_websocket_timeout_ms};
if (PathExists(FLAGS_ssl_certificate)) {
options.push_back(“ssl_certificate”);
options.push_back(FLAGS_ssl_certificate);
} else if (FLAGS_ssl_certificate.size() > 0) {
AERROR << “Certificate file " << FLAGS_ssl_certificate
<< " does not exist!”;
}
server_.reset(new CivetServer(options));