forked from apache/drill
-
Notifications
You must be signed in to change notification settings - Fork 0
Notes on Implementation
Xiao Meng edited this page Aug 12, 2014
·
5 revisions
- JTC1/SC22/WG21 paper N3389
- Boost.Asio Network programming, Meeting C++ 2012
- Asynchronous I/O with Boost.Asio, Meeting C++ 2012
- https://github.com/boostcon/2011_presentations/raw/master/mon/thinking_asynchronously.pdf
- http://www.boost.org/doc/libs/1_56_0/doc/html/boost_asio/reference/asynchronous_operations.html#boost_asio.reference.asynchronous_operations.return_type_of_an_initiating_function
// Read messages from `_buf` to msg, and use allocatedBuffer to track the lifetime of buffer allocated inside the function.
status_t DrillClientImpl::readMsg(
ByteBuf_t _buf,
AllocatedBufferPtr* allocatedBuffer,
InBoundRpcMessage& msg,
boost::system::error_code& error)public static RpcConfig MAPPING = RpcConfig.newBuilder("USER-RPC-MAPPING") //
.add(RpcType.HANDSHAKE, UserToBitHandshake.class, RpcType.HANDSHAKE, BitToUserHandshake.class) //user to bit.
.add(RpcType.RUN_QUERY, RunQuery.class, RpcType.QUERY_HANDLE, QueryId.class) //user to bit
.add(RpcType.CANCEL_QUERY, QueryId.class, RpcType.ACK, Ack.class) //user to bit
.add(RpcType.QUERY_RESULT, QueryResult.class, RpcType.ACK, Ack.class) //bit to user
.build();👍