Hi,
Before I re-invent the wheel:
We've (all) used net.Pipe to model a network connection in testbenches. For 
my purposes it would be handy if I had one that was more realistic. i.e. it 
dropped some packets and re-ordered some, maybe even duplicated a few, 
added (random) delays to sending etc.
Now it doesn't have to be realistic from a benchmarking perspective, it 
would just be good to make sure my application can cope with the sort of 
nonsense a real application does.

Does such a thing already exist?

I mocked up a rough attempt at one based on net.Pipe, but the issue seemed 
to be that I had visibility of io.Writer/Reader calls. This meant that I 
couldn't guarantee that one call to the UnreliablePipe corresponded to one 
packet. In fact what seemed to be happening was that I often got a fragment 
of a packet as the Writer broke up the packet into multiple calls(This 
might be an artefact of how I was structuring the buffers, needs debugging).
As I say before I go too far down this particular rabbit hole I thought I 
should ask if anyone is aware of solving this problem already.

Any thoughts?

Many Thanks

Chris

-- 
You received this message because you are subscribed to the Google Groups 
"golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to golang-nuts+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to