Commit dfcf808f authored by Marian Triebe's avatar Marian Triebe

Fix broken broker examples. This closes #169

parent 7964c4ba
......@@ -53,6 +53,7 @@ void protobuf_io(broker* self, connection_handle hdl, const actor& buddy) {
int32_t s = htonl(static_cast<int32_t>(buf.size()));
self->write(hdl, sizeof(int32_t), &s);
self->write(hdl, buf.size(), buf.data());
self->flush(hdl);
};
message_handler default_bhvr = {
[=](const connection_closed_msg&) {
......
......@@ -64,6 +64,7 @@ template <class T>
void write_int(broker* self, connection_handle hdl, T value) {
auto cpy = static_cast<T>(htonl(value));
self->write(hdl, sizeof(T), &cpy);
self->flush(hdl);
}
// utility function for reading an ingeger from incoming data
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment