Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix comments on the behaviour of grpc_ops #13

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 6 additions & 7 deletions core/src/Network/GRPC/Unsafe/Op.chs
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,8 @@ deriving instance Show OpArray

-- | Creates an op of type GRPC_OP_SEND_INITIAL_METADATA at the specified
-- index of the given 'OpArray', containing the given
-- metadata. The metadata is copied and can be destroyed after calling this
-- function.
-- metadata. The metadata is moved and will be freed automatically when
-- all the ops of a certain call is finished.
{#fun unsafe op_send_initial_metadata as ^
{`OpArray', `Int', `MetadataKeyValPtr', `Int'} -> `()'#}

Expand All @@ -58,8 +58,8 @@ deriving instance Show OpArray
{#fun unsafe op_send_initial_metadata_empty as ^ {`OpArray', `Int'} -> `()'#}

-- | Creates an op of type GRPC_OP_SEND_MESSAGE at the specified index of
-- the given 'OpArray'. The given 'ByteBuffer' is
-- copied and can be destroyed after calling this function.
-- the given 'OpArray'. The given 'ByteBuffer' is moved and will be
-- freed automatically when all the ops of a certain call is finished.
{#fun unsafe op_send_message as ^ {`OpArray', `Int', `ByteBuffer'} -> `()'#}

-- | Creates an 'Op' of type GRPC_OP_SEND_CLOSE_FROM_CLIENT at the specified
Expand Down Expand Up @@ -96,9 +96,8 @@ deriving instance Show OpArray
{#fun unsafe op_recv_close_server as ^ {`OpArray', `Int', id `Ptr CInt'} -> `()'#}

-- | Creates an op of type GRPC_OP_SEND_STATUS_FROM_SERVER at the specified
-- index of the given 'OpArray'. The given
-- Metadata and string are copied when creating the op, and can be safely
-- destroyed immediately after calling this function.
-- index of the given 'OpArray'. The given metadata and string are moved
-- and will be freed automatically when all the ops of a certain call is finished.
{#fun unsafe op_send_status_server as ^
{`OpArray', `Int', `Int', `MetadataKeyValPtr', `StatusCode', `Slice'}
-> `()'#}