Skip to content

Conversation

@kgiusti
Copy link
Contributor

@kgiusti kgiusti commented Oct 14, 2020

This may be the wrong way to solve this - fixing it at the message construction phase rather than at message decode.

This patch adds a new body-data message API call:
void qd_message_body_data_append(qd_message_t *msg, qd_buffer_list_t *data);

A single call to this would replace this logic in the adaptors:

  • //
  • // Compose a DATA performative for this section of the stream
  • //
  • qd_composed_field_t *field = qd_compose(QD_PERFORMATIVE_BODY_DATA, 0);
  • qd_compose_insert_binary_buffers(field, body);
  • //
  • // Extend the streaming message and free the composed field
  • //
  • qd_message_extend(msg, field);
  • qd_compose_free(field);

Copy link
Contributor

@ChugR ChugR left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All adaptors should be required to use this interface.

@kgiusti
Copy link
Contributor Author

kgiusti commented Oct 20, 2020

Merged to dev-protocol-adaptors-2 branch

@kgiusti kgiusti closed this Oct 20, 2020
@kgiusti kgiusti deleted the DISPATCH-1803 branch October 20, 2020 18:31
asfgit pushed a commit that referenced this pull request Dec 10, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants