• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2  * Copyright (C) 2017 The Android Open Source Project
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  *      http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  */
16 
17 #include <algorithm>
18 #include <string>
19 
20 #include <gflags/gflags.h>
21 
22 #include "common/libs/glog/logging.h"
23 #include "host/frontend/vnc_server/vnc_server.h"
24 #include "host/frontend/vnc_server/vnc_utils.h"
25 #include "host/libs/config/cuttlefish_config.h"
26 
27 DEFINE_bool(agressive, false, "Whether to use agressive server");
28 DEFINE_int32(port, 6444, "Port where to listen for connections");
29 
main(int argc,char * argv[])30 int main(int argc, char* argv[]) {
31   using ::android::base::ERROR;
32   ::android::base::InitLogging(argv, android::base::StderrLogger);
33   ::gflags::ParseCommandLineFlags(&argc, &argv, true);
34   cvd::vnc::VncServer vnc_server(FLAGS_port, FLAGS_agressive);
35   vnc_server.MainLoop();
36 }
37