فهرست منبع

fix: -Wreorder

ithewei 2 سال پیش
والد
کامیت
a2c4c7448f
2فایلهای تغییر یافته به همراه17 افزوده شده و 16 حذف شده
  1. 6 5
      http/server/HttpHandler.cpp
  2. 11 11
      http/server/HttpHandler.h

+ 6 - 5
http/server/HttpHandler.cpp

@@ -28,20 +28,21 @@ HttpHandler::HttpHandler(hio_t* io) :
     keepalive(true),
     proxy(false),
     upgrade(false),
+    ip{'\0'},
     port(0),
     pid(0),
     tid(0),
     // for http
     io(io),
     service(NULL),
-    ws_service(NULL),
     api_handler(NULL),
-    // for sendfile
-    files(NULL),
-    file(NULL),
     // for websocket
+    ws_service(NULL),
     last_send_ping_time(0),
-    last_recv_pong_time(0)
+    last_recv_pong_time(0),
+    // for sendfile
+    files(NULL),
+    file(NULL)
 {
     // Init();
 }

+ 11 - 11
http/server/HttpHandler.h

@@ -56,6 +56,17 @@ public:
     HttpContextPtr          ctx;
     http_handler*           api_handler;
 
+    // for GetSendData
+    std::string             header;
+    // std::string          body;
+
+    // for websocket
+    WebSocketService*       ws_service;
+    WebSocketChannelPtr     ws_channel;
+    WebSocketParserPtr      ws_parser;
+    uint64_t                last_send_ping_time;
+    uint64_t                last_recv_pong_time;
+
     // for sendfile
     FileCache               *files;
     file_cache_ptr          fc; // cache small file
@@ -64,17 +75,6 @@ public:
         uint64_t            timer;
     } *file; // for large file
 
-    // for GetSendData
-    std::string             header;
-    // std::string          body;
-
-    // for websocket
-    WebSocketService*           ws_service;
-    WebSocketChannelPtr         ws_channel;
-    WebSocketParserPtr          ws_parser;
-    uint64_t                    last_send_ping_time;
-    uint64_t                    last_recv_pong_time;
-
     HttpHandler(hio_t* io = NULL);
     ~HttpHandler();