mirror of
https://github.com/mutouyun/cpp-ipc.git
synced 2025-12-06 16:56:45 +08:00
update chat
This commit is contained in:
parent
e88a4cf865
commit
881f98c241
@ -15,3 +15,5 @@ SOURCES += \
|
|||||||
|
|
||||||
LIBS += \
|
LIBS += \
|
||||||
-L$${DESTDIR} -lipc
|
-L$${DESTDIR} -lipc
|
||||||
|
|
||||||
|
unix:LIBS += -lrt -lpthread
|
||||||
|
|||||||
@ -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
|
||||||
|
|
||||||
|
|||||||
@ -34,3 +34,5 @@ SOURCES += \
|
|||||||
|
|
||||||
LIBS += \
|
LIBS += \
|
||||||
-L$${DESTDIR} -lipc
|
-L$${DESTDIR} -lipc
|
||||||
|
|
||||||
|
unix:LIBS += -lrt -lpthread
|
||||||
|
|||||||
@ -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;
|
||||||
}
|
}
|
||||||
}};
|
}};
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user