implement subscribe in STOMP
This commit is contained in:
parent
847393cec3
commit
0907d3373c
6
main.cpp
6
main.cpp
@ -26,5 +26,11 @@ int main(int argc, char *argv[]) {
|
|||||||
{"login", "sdi10"},
|
{"login", "sdi10"},
|
||||||
{"passcode", "809c02f36becb0868da98761fe3209f6"}
|
{"passcode", "809c02f36becb0868da98761fe3209f6"}
|
||||||
}).send(socket);
|
}).send(socket);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
STOMPFrame(STOMPFrame::MESSAGE, {
|
||||||
|
{},
|
||||||
|
}).send(socket);
|
||||||
return application.exec();
|
return application.exec();
|
||||||
}
|
}
|
||||||
|
@ -4,7 +4,7 @@ Stomp::Stomp() {
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
bool Stomp::subscribe(interface::iStompObserver obs) {
|
bool Stomp::subscribe(interface::iStompObserver* obs) {
|
||||||
for(int i = 0; i < MAX_OBSERVER; i++) {
|
for(int i = 0; i < MAX_OBSERVER; i++) {
|
||||||
if (observer_[i] == nullptr) {
|
if (observer_[i] == nullptr) {
|
||||||
observer_[i] = obs;
|
observer_[i] = obs;
|
||||||
@ -12,5 +12,6 @@ bool Stomp::subscribe(interface::iStompObserver obs) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user