24#include <fvutils/net/fuse_message.h>
25#include <fvutils/net/fuse_message_queue.h>
26#include <fvutils/net/fuse_transceiver.h>
27#include <netcomm/socket/stream.h>
28#include <netcomm/utils/exceptions.h>
29#include <netinet/in.h>
58 while (!msgq->empty()) {
90 unsigned int max_num_msgs)
95 unsigned int num_msgs = 0;
102 if (payload_size > 0) {
103 msg.
payload = malloc(payload_size);
113 }
while (s->
available() && (num_msgs < max_num_msgs));
Thrown if the connection died during an operation.
void lock() const
Lock queue.
void unlock() const
Unlock list.
void unref()
Decrement reference count and conditionally delete this instance.
virtual bool available()
Check if data is available.
virtual size_t read(void *buf, size_t count, bool read_all=true)
Read from socket.
virtual void write(const void *buf, size_t count)
Write to the socket.
TCP stream socket over IP.
A LockQueue of FuseNetworkMessage to hold messages in inbound and outbound queues.
size_t payload_size() const
Get payload size.
const FUSE_message_t & fmsg() const
Get plain message.
void pack()
Pack data for sending.
static void send(fawkes::StreamSocket *s, FuseNetworkMessageQueue *msgq)
Send messages.
static void recv(fawkes::StreamSocket *s, FuseNetworkMessageQueue *msgq, unsigned int max_num_msgs=8)
Receive data.
Fawkes library namespace.
FUSE_header_t header
header