OLD | NEW |
1 /* | 1 /* |
2 * Copyright 2016 Google Inc. | 2 * Copyright 2016 Google Inc. |
3 * | 3 * |
4 * Use of this source code is governed by a BSD-style license that can be | 4 * Use of this source code is governed by a BSD-style license that can be |
5 * found in the LICENSE file. | 5 * found in the LICENSE file. |
6 */ | 6 */ |
7 | 7 |
8 #include "Request.h" | 8 #include "Request.h" |
9 #include "Response.h" | 9 #include "Response.h" |
10 | 10 |
11 #include "SkCommandLineFlags.h" | 11 #include "SkCommandLineFlags.h" |
12 #include "SkGraphics.h" | 12 #include "SkGraphics.h" |
13 | 13 |
14 #include "microhttpd.h" | 14 #include "microhttpd.h" |
15 | 15 |
16 #include "urlhandlers/UrlHandler.h" | 16 #include "urlhandlers/UrlHandler.h" |
17 | 17 |
18 #include <errno.h> | 18 #include <errno.h> |
| 19 |
| 20 #if !defined _WIN32 |
19 #include <sys/socket.h> | 21 #include <sys/socket.h> |
20 #include <arpa/inet.h> | 22 #include <arpa/inet.h> |
| 23 #endif |
21 | 24 |
22 using namespace Response; | 25 using namespace Response; |
23 | 26 |
24 DEFINE_int32(port, 8888, "The port to listen on."); | 27 DEFINE_int32(port, 8888, "The port to listen on."); |
25 DEFINE_string(address, "127.0.0.1", "The address to bind to."); | 28 DEFINE_string(address, "127.0.0.1", "The address to bind to."); |
26 | 29 |
27 class UrlManager { | 30 class UrlManager { |
28 public: | 31 public: |
29 UrlManager() { | 32 UrlManager() { |
30 // Register handlers | 33 // Register handlers |
(...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
115 MHD_stop_daemon(daemon); | 118 MHD_stop_daemon(daemon); |
116 return 0; | 119 return 0; |
117 } | 120 } |
118 | 121 |
119 #if !defined SK_BUILD_FOR_IOS | 122 #if !defined SK_BUILD_FOR_IOS |
120 int main(int argc, char** argv) { | 123 int main(int argc, char** argv) { |
121 SkCommandLineFlags::Parse(argc, argv); | 124 SkCommandLineFlags::Parse(argc, argv); |
122 return skiaserve_main(); | 125 return skiaserve_main(); |
123 } | 126 } |
124 #endif | 127 #endif |
OLD | NEW |