Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>Have you tried it with Boost's TCP? I don't see why 2MB would be an issue to transfer. I'm assuming we're talking about a LAN running at 100mbps or 1gbps, a computer with plenty of RAM, and don't have to have > 20ms response times? If your goal is to just get all 2MB from one computer to another, just send it, TCP will handle chunking it up for you.</p> <p>I have a TCP latency checking tool that I wrote with Boost, that tries to send buffers of various sizes, I routinely check up to 20MB and those seem to get through without problems. </p> <p>I guess what I'm trying to say is don't spend your time developing a solution unless you know you have a problem :-)</p> <p>--------- Solution Implementation --------</p> <p>Now that I've had a few minutes on my hands, I went through and made a quick implementation of what you were talking about: <a href="https://github.com/teeks99/data-chunker" rel="nofollow noreferrer">https://github.com/teeks99/data-chunker</a> There are three big parts: </p> <p>The serializer/deserializer, boost has its own, but its not much better than rolling your own, so I did. </p> <p>Sender - Connects to the receiver over TCP and sends the data </p> <p>Receiver - Waits for connections from the sender and unpacks the data it receives. </p> <p>I've included the .exe(s) in the zip, run Sender.exe/Receiver.exe --help to see the options, or just look at main.</p> <p>More detailed explanation: Open two command prompts, and go to DataChunker\Debug in both of them. Run Receiver.exe in one of the Run Sender.exe in the other one (possible on a different computer, in which case add --remote-host=IP.ADD.RE.SS after the executable name, if you want to try sending more than once and --num-sends=10 to send ten times). Looking at the code, you can see what's going on, creating the receiver and sender ends of the TCP socket in the respecitve main() functions. The sender creates a new PrimitiveCollection and fills it in with some example data, then serializes and sends it...the receiver deserializes the data into a new PrimitiveCollection, at which point the primitive collection could be used by someone else, but I just wrote to the console that it was done.</p> <p><strong>Edit:</strong> Moved the example to github.</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload