Network

BlitzMax Forums/BlitzMax Programming/Network

splinux(Posted 2006) [#1]
Is it possible to send arrays(huge arrays) through GNET?
I mean arrays of some kb.


splinux(Posted 2006) [#2]
Please, i need it,..


*(Posted 2006) [#3]
You best bet would be to send it through in segments, TBH if you have a large array I would send it like that as you will get less packet loss and faster transfer (ie no need to keep sending it till its sent).


splinux(Posted 2006) [#4]
Ok, but how could i transfer it as segments?
with gnet i could only transfer double per double.


*(Posted 2006) [#5]
I would pack the whole lot into a string then send that, have a look in the code archives there are loads of x to str functions in there last time I looked. If you pack it all up then send it you will get faster transfer and then just make an unpacker at the other end to retrieve the data.


splinux(Posted 2006) [#6]
They are double values, it would be impossible to pack them into a string.
It would be a string of some megabytes.


*(Posted 2006) [#7]
Double values IIRC 8 bytes so even 100 of them is only 800 Bytes, so you send some not the whole level.


splinux(Posted 2006) [#8]
It's an array of thousands of elements.
Doing so it would be not efficient for speed, as i would need.


FlameDuck(Posted 2006) [#9]
They are double values, it would be impossible to pack them into a string.
Not at all.

It's an array of thousands of elements.
Sending a thousand Doubles is still only 8K worth of data. You could send that in 2 seconds on a crappy modenm connection.


splinux(Posted 2006) [#10]
2 seconds?
i need it a lot faster.
the whole operation should take max. 100ms.
however it's on a lan.


FlameDuck(Posted 2006) [#11]
What kinda speed on a LAN? If it's a 100MBit then it caps out at roughly 12,5 MB/s if there's no other traffic. For 100ms, that would then be 1.25MB you can send. The means that the highest theoretical possible amount of doubles you can send is 160 thousand (if my math isn't completely off) not taking frame overhead into account, so probably about half that.


splinux(Posted 2006) [#12]
Yes, but that's not the way i'd need to send the data.
However it's not needed any more.
Thank you for having tryied to help me.