Skip to content

Streaming the file problem #3805

Answered by nibanks
moondayyy asked this question in Q&A
Discussion options

You must be logged in to vote

The Context pointer is just a local (to your process) object that is passed back to you from when you originally registered your callback, either via from StreamOpen (if you created the stream) or when you called SetCallbackHandler (if the peer created it). It's not something that will be usable by the peer.

If you need this information to be given to the peer then you will need to encode it on the wire and send it too, perhaps as some kind of metadata header for your stream data. For instance, if all you want to send is the total size, encode that in the first few bytes of the stream explicitly.

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by moondayyy
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants