hewei.it 4 年之前
父节点
当前提交
da43cf386a
共有 3 个文件被更改,包括 4 次插入2 次删除
  1. 2 0
      event/hevent.c
  2. 1 1
      examples/qt/client/mainwindow.cpp
  3. 1 1
      examples/qt/server/mainwindow.cpp

+ 2 - 0
event/hevent.c

@@ -302,6 +302,8 @@ void hio_read_cb(hio_t* io, void* buf, int len) {
         size_t small_size = io->readbuf.len / 2;
         size_t small_size = io->readbuf.len / 2;
         if (len < small_size) {
         if (len < small_size) {
             ++io->small_readbytes_cnt;
             ++io->small_readbytes_cnt;
+        } else {
+            io->small_readbytes_cnt = 0;
         }
         }
     }
     }
 }
 }

+ 1 - 1
examples/qt/client/mainwindow.cpp

@@ -28,7 +28,7 @@ void MainWindow::initUI()
 {
 {
     initMenu();
     initMenu();
 
 
-    setFixedSize(640, 480);
+    setFixedSize(800, 600);
 
 
     QVBoxLayout* vbox = new QVBoxLayout();
     QVBoxLayout* vbox = new QVBoxLayout();
 
 

+ 1 - 1
examples/qt/server/mainwindow.cpp

@@ -27,7 +27,7 @@ void MainWindow::initUI()
 {
 {
     initMenu();
     initMenu();
 
 
-    setFixedSize(640, 480);
+    setFixedSize(800, 600);
 
 
     QVBoxLayout* vbox = new QVBoxLayout();
     QVBoxLayout* vbox = new QVBoxLayout();