Allow sending preformatted messages

pull/151/head
Craig Tiller 10 years ago committed by Craig Tiller
parent ce6e350111
commit 7cfa2d951d
  1. 3
      src/core/channel/call_op_string.c
  2. 2
      src/core/channel/channel_stack.h
  3. 2
      src/core/channel/connected_channel.c

@ -112,6 +112,9 @@ char *grpc_call_op_string(grpc_call_op *op) {
case GRPC_SEND_MESSAGE:
bprintf(&b, "SEND_MESSAGE");
break;
case GRPC_SEND_PREFORMATTED_MESSAGE:
bprintf(&b, "SEND_PREFORMATTED_MESSAGE");
break;
case GRPC_SEND_FINISH:
bprintf(&b, "SEND_FINISH");
break;

@ -69,6 +69,8 @@ typedef enum {
GRPC_SEND_START,
/* send a message to the channels peer */
GRPC_SEND_MESSAGE,
/* send a pre-formatted message to the channels peer */
GRPC_SEND_PREFORMATTED_MESSAGE,
/* send half-close to the channels peer */
GRPC_SEND_FINISH,
/* request that more data be allowed through flow control */

@ -140,6 +140,8 @@ static void call_op(grpc_call_element *elem, grpc_call_element *from_elem,
grpc_sopb_add_begin_message(&calld->outgoing_sopb,
grpc_byte_buffer_length(op->data.message),
op->flags);
/* fall-through */
case GRPC_SEND_PREFORMATTED_MESSAGE:
copy_byte_buffer_to_stream_ops(op->data.message, &calld->outgoing_sopb);
calld->outgoing_buffer_length_estimate +=
(5 + grpc_byte_buffer_length(op->data.message));

Loading…
Cancel
Save