You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently, a server application using review-protocol has to rely on low-level functions from the oinq crate (e.g., frame::send_raw) to handle message exchanges. This requires manual designation of message kinds using enum RequestCode, which goes against our goal of encapsulating all protocol details within review-protocol.
This task aims to provide high-level functions in the server module of review-protocol that a server application can utilize to send specific types of messages. This will simplify the interaction between the server and its clients, ensuring that the server does not need to directly specify RequestCode or call oinq functions.
Objectives
Implement high-level functions in the server module of review-protocol for sending messages.
Ensure these functions abstract away the details of RequestCode.
Tasks
Define High-Level Functions:
Identify the common types of messages a server needs to send.
Define corresponding high-level functions in the server module of review-protocol.
Encapsulate Message Kind (RequestCode):
Within each high-level function, map the specific operation to the appropriate RequestCode.
Ensure that these mappings are not exposed in the public API.
Integrate with oinq:
Use oinq internally within review-protocol to send messages.
Ensure that oinq functions are called with the correct parameters based on the high-level function calls.
Example
Instead of a server doing this:
let code = RequestCode::SpecificOperation;let buf = // serialize a message with the code and parameters
oinq::send_raw(send, buf);
Currently, a server application using review-protocol has to rely on low-level functions from the
oinq
crate (e.g.,frame::send_raw
) to handle message exchanges. This requires manual designation of message kinds usingenum RequestCode
, which goes against our goal of encapsulating all protocol details withinreview-protocol
.This task aims to provide high-level functions in the
server
module ofreview-protocol
that a server application can utilize to send specific types of messages. This will simplify the interaction between the server and its clients, ensuring that the server does not need to directly specifyRequestCode
or calloinq
functions.Objectives
server
module ofreview-protocol
for sending messages.RequestCode
.Tasks
Define High-Level Functions:
server
module ofreview-protocol
.Encapsulate Message Kind (
RequestCode
):RequestCode
.Integrate with
oinq
:oinq
internally withinreview-protocol
to send messages.oinq
functions are called with the correct parameters based on the high-level function calls.Example
Instead of a server doing this:
REview should be able to do this:
Requests initiated by server
Requests initiated by client
The text was updated successfully, but these errors were encountered: