mirror of
https://github.com/mutouyun/cpp-ipc.git
synced 2025-12-07 01:06:45 +08:00
update chat
This commit is contained in:
parent
e88a4cf865
commit
881f98c241
@ -15,3 +15,5 @@ SOURCES += \
|
||||
|
||||
LIBS += \
|
||||
-L$${DESTDIR} -lipc
|
||||
|
||||
unix:LIBS += -lrt -lpthread
|
||||
|
||||
@ -53,8 +53,6 @@ SOURCES += \
|
||||
../src/platform/shm_linux.cpp \
|
||||
../src/platform/tls_pointer_linux.cpp
|
||||
|
||||
LIBS += -lrt
|
||||
|
||||
target.path = /usr/lib
|
||||
INSTALLS += target
|
||||
|
||||
|
||||
@ -34,3 +34,5 @@ SOURCES += \
|
||||
|
||||
LIBS += \
|
||||
-L$${DESTDIR} -lipc
|
||||
|
||||
unix:LIBS += -lrt -lpthread
|
||||
|
||||
@ -21,8 +21,11 @@ int main() {
|
||||
auto buf = cc.recv();
|
||||
if (buf.empty()) continue;
|
||||
std::string dat { static_cast<char const *>(buf.data()), buf.size() - 1 };
|
||||
if (dat == quit__) return;
|
||||
std::cout << dat << std::endl;
|
||||
if (dat == quit__) {
|
||||
std::cout << "receiver quit..." << std::endl;
|
||||
return;
|
||||
}
|
||||
std::cout << "> " << dat << std::endl;
|
||||
}
|
||||
}};
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user