Network
BlitzMax Forums/BlitzMax Programming/Network
| ||
Is it possible to send arrays(huge arrays) through GNET? I mean arrays of some kb. |
| ||
Please, i need it,.. |
| ||
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). |
| ||
Ok, but how could i transfer it as segments? with gnet i could only transfer double per double. |
| ||
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. |
| ||
They are double values, it would be impossible to pack them into a string. It would be a string of some megabytes. |
| ||
Double values IIRC 8 bytes so even 100 of them is only 800 Bytes, so you send some not the whole level. |
| ||
It's an array of thousands of elements. Doing so it would be not efficient for speed, as i would need. |
| ||
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. |
| ||
2 seconds? i need it a lot faster. the whole operation should take max. 100ms. however it's on a lan. |
| ||
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. |
| ||
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. |