uhm, you don't need to specify the amount of data you want to receive?Originally Posted by paul_nichollsWhen I do get packets (including the packet type), I get the whole packet, it is just the order of the received packets that could be out of order (Not LAN, but over internet or possibly WAN too)...Originally Posted by arthurprssince the packets have diferent sizesOriginally Posted by paul_nichollsWhy not?Originally Posted by arthurprsi don't think that it will work with udp :? or will?
You can read and write data via UDP the same as TCP, it just isn't guarenteed to arrive at its destination, or in the correct order.
the read/write bit should still work if you make a TPacketWriter/Reader descendant to write/read data using UDP, let's say via Synapse for example.
cheers,
Paul
how do you will receive then (you don't know the type of package, any package can arrive anytime in anyorder) :? ?
If I want to worry about that issue, I would put in a time-stamp on the packets and disregard out of order packets (if not super important)
Also it doesn't matter that the packet sizes are different, the send/receive code takes care of that for me regardless of the reader/writer class being used.
I hope this makes sense,
cheers,
Paul
Bookmarks