Boost logo

Boost :

Subject: Re: [boost] async_read SEGFAULT
From: hh h (jupiter.hce_at_[hidden])
Date: 2019-01-07 20:21:46

Thanks Richard, I was wandering the strand real role, thanks for the

As you pointed out the two life time static buffers one for read one
for write should be the same as the life time of the socket attached
to each session. In a server, there could be more than thousand
session connections, in terms of resource management, would you think
it is good or bad idea if to use a global buffer pool management class
so the global buffers can be shared by all sessions?

One thing is clear, that a fixed size array like boost::array<char,
MAX_SIZE> readBuffer for each session async_read should not be used
(which I am currently using), allocate and reserve more than thousands
MAX_SIZE buffer in memory is not going to work. I'll have to see if it
can be replaced by other boost simple smart buffer like
boost::asio::buffer which can be converted to a raw pointer char* for
feeding msgpack unpack input. (Vinnie did mention to use beast, might be
another option, I have to see how complicated that will be)

Boost list run by bdawes at, gregod at, cpdaniel at, john at