update chat

This commit is contained in:
mutouyun 2019-02-13 17:11:01 +08:00
parent e88a4cf865
commit 881f98c241
4 changed files with 9 additions and 4 deletions

View File

@ -15,3 +15,5 @@ SOURCES += \
LIBS += \ LIBS += \
-L$${DESTDIR} -lipc -L$${DESTDIR} -lipc
unix:LIBS += -lrt -lpthread

View File

@ -53,8 +53,6 @@ SOURCES += \
../src/platform/shm_linux.cpp \ ../src/platform/shm_linux.cpp \
../src/platform/tls_pointer_linux.cpp ../src/platform/tls_pointer_linux.cpp
LIBS += -lrt
target.path = /usr/lib target.path = /usr/lib
INSTALLS += target INSTALLS += target

View File

@ -34,3 +34,5 @@ SOURCES += \
LIBS += \ LIBS += \
-L$${DESTDIR} -lipc -L$${DESTDIR} -lipc
unix:LIBS += -lrt -lpthread

View File

@ -21,8 +21,11 @@ int main() {
auto buf = cc.recv(); auto buf = cc.recv();
if (buf.empty()) continue; if (buf.empty()) continue;
std::string dat { static_cast<char const *>(buf.data()), buf.size() - 1 }; std::string dat { static_cast<char const *>(buf.data()), buf.size() - 1 };
if (dat == quit__) return; if (dat == quit__) {
std::cout << dat << std::endl; std::cout << "receiver quit..." << std::endl;
return;
}
std::cout << "> " << dat << std::endl;
} }
}}; }};