question

Upvotes
Accepted
21 2 6 10

Is it possible to make a copy of encoded buffer and just change the stream ids before writing to UPA?

elektronelektron-sdkrrteta-apielektron-transport-api
icon clock
10 |1500

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Upvote
Accepted
32.2k 40 11 20

Hello @Kam.Anjorin,

RsslBuffer itself is a storage buffer, has a data (contents) and a length. As such, you can create another buffer, allocate storage, and copy, from the first buffer, the data and the length. Then you would modify the content of the first RsslBuffer prior to posting it. Yes, it is feasible to do it this way.

However, RsslBuffer is designed as a vehicle, to carry various OMM structures, messages, creating via encode/decode, shown in UPA SDK examples, RsslProvider, RsslEncodeDecodeExample, etc.

I would suggest approaching this way, encoding the new MarketPrice or fieldList or Map, as to me this is a more structured approach, less error prone, and also you may be able to reuse a lot of the existent code from the examples.

icon clock
10 |1500

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Upvotes
21 2 6 10

This is interactive provider that sends mkt data via adh/ads to the clients.

it is based on UPA API running Linux with TR upa8.0.0.L1.linux.rrg.

The question wants to know whether it's possible/permissible to copy one encoded rsslBuffer to and another before doing rsslWrite on the first buffer.

Then, on the copied buffer, update a fieldEntry and then do rsslWrite.

icon clock
10 |1500

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.