From 9ebe80228c7b7cb35ccaeaaa46ccf726bf71d6bd Mon Sep 17 00:00:00 2001
From: wangzhengquan <wangzhengquan85@126.com>
Date: 星期六, 10 十月 2020 18:42:15 +0800
Subject: [PATCH] update

---
 src/socket/net_mod_socket.c |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)

diff --git a/src/socket/net_mod_socket.c b/src/socket/net_mod_socket.c
index 572fe21..e1f71f0 100644
--- a/src/socket/net_mod_socket.c
+++ b/src/socket/net_mod_socket.c
@@ -1,5 +1,6 @@
 #include "net_mod_socket.h"
 #include "socket_io.h"
+#include "net_mod_socket_io.h"
 
 NetModSocket::NetModSocket(const char *host, int port) 
 {
@@ -12,10 +13,11 @@
 
 ssize_t NetModSocket::send(void *buf, size_t size) {
   int n = rio_writen(clientfd, buf, size);
+  rio_writen(clientfd, PKG_SEP, strlen(PKG_SEP));
 
   char resp[MAXLINE];
   int ss;
-  ss = rio_readlineb(&rio, resp, MAXLINE);
+  ss = rio_readpkgb(&rio, resp, MAXLINE);
   puts(resp);
   return n;
 }

--
Gitblit v1.8.0