Quote Originally Posted by arthurprs
Quote Originally Posted by paul_nicholls
Quote Originally Posted by arthurprs
i don't think that it will work with udp :? or will?
Why not?
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
since the packets have diferent sizes
how do you will receive then (you don't know the type of package, any package can arrive anytime in anyorder) :? ?
When 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)...

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