]> git.apps.os.sepia.ceph.com Git - ceph.git/commit
crimson/net: centralized write_event()
authorYingxin Cheng <yingxincheng@gmail.com>
Fri, 25 Jan 2019 08:36:27 +0000 (16:36 +0800)
committerYingxin Cheng <yingxincheng@gmail.com>
Fri, 22 Mar 2019 06:52:23 +0000 (14:52 +0800)
commit55a76b48643cad93e842a7a0e14259ad91c17ca0
tree4e9c6896c48c101b80d8c5e16aec768eeb48a33a
parent2ea299b640be4fdde7e52cbb3534308e8f50a51f
crimson/net: centralized write_event()

* introduce write_state_t to decouple write behaviors from states.
* replace `h.promise` with `state_changed`, with a more general way to
  change write behaviors according to state switches.
* centralize write_event() to dispatch writes in the open state.
* friendly interface for v1/v2 protocol abstraction.

Signed-off-by: Yingxin Cheng <yingxincheng@gmail.com>
src/crimson/net/SocketConnection.cc
src/crimson/net/SocketConnection.h