-
I want to send a file from the client to the server with the StreamSend method, but the file is sent once on the client side, but it is automatically divided into parts on the server side. If I know the size of the file I want to send on the server side, I can combine it with Event->RECEIVE.AbsoluteOffset. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
The 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. |
Beta Was this translation helpful? Give feedback.
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.