autobahn-cpp icon indicating copy to clipboard operation
autobahn-cpp copied to clipboard

Add option to use async writes on the transport

Open xhou-wavefin opened this issue 7 years ago • 2 comments

I'm wondering why you use sync write operation in publishing?

https://github.com/crossbario/autobahn-cpp/blob/master/autobahn/wamp_rawsocket_transport.ipp#L153

The reason I ask is that we get into a problem that our only thread is stuck on this sync write operation around sleep time.

xhou-wavefin avatar Apr 25 '18 10:04 xhou-wavefin

we could easily have an user option to do writes async (PRs welcome;) (https://www.boost.org/doc/libs/1_67_0/doc/html/boost_asio/reference/async_write.html)

I guess there will be scenarios (many small messages) where it (async write) might have a performance impact. so IMO it should be an option.

oberstet avatar Apr 26 '18 15:04 oberstet

Bonefish is doing the same thing....

https://github.com/tplgy/bonefish/blob/master/src/bonefish/rawsocket/tcp_connection.hpp#L78

This really isn't good.

nlyan2025 avatar Apr 27 '18 13:04 nlyan2025